• Unbound ComboBox Appears to be Bound (Accesss 97)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Unbound ComboBox Appears to be Bound (Accesss 97)

    Author
    Topic
    #367576

    I have a ComboBox on a form which is unbound, technically it is bound to the recordsource, but says unbound on the caption in design view. It is set to two columns with the first one having a width property set so it doesn’t display. The SQL that sets its recordsource is set to the data populating the subform, which is the many side of the relationship in a grid view. Column(0) stores the Lease number, for which the form and subform are linked. Column 1 stores the serial number of the item which is only in the recordsource of the subform.

    This is generally an inventory database of leased equipment. When the user selects a serial number, it simply searches the main form for that Lease Number using the RecordsetClone / Bookmark thing. This works fine with recalling the record.

    For some reason, after the record is recalled the ComboBox displays the first serial number of the record in the subform. I have no clue how this value is getting into the field. When I try to explicitly clear the field, or set it to the value of a variable that I set to capture the correct serial number, it raises an error (2115) indicating that the form is unable to change the value of this field after it has been updated. I mean, it isn’t even boudnd to anything but its underlying recordsource.

    Viewing 1 reply thread
    Author
    Replies
    • #573538

      Mike,

      Could you check the Record Source and the Control Source of the combo box Properties in Design View?

      If it is an unbound combo box, the Record Source should be blank, and the Control Source should have some kind of SQL statement.

      It’s probably best to start there for now.

      Tom

      • #573557

        Actually, in the generic combo box that comes with Access, it has a rowsource – which is where the SQL statement goes. The control source is what binds the control to a field in a form.

        • #573558

          Mike,

          You’re absolutely right! (And I feel absolutely foolish.) blush blush blush

          (Well, maybe others can be rofl over this.)

          My apologies.

          Tom

          • #573559

            Ha, well I don’t hold it against you, Tom. I have trouble keeping track of all this myself

    • #573572

      Is your combo box on the subform or the main form? As you describe the situation, it is truly unbound. The row source doesn’t really do any binding – it just controls what data is displayed in the text box. Also, how are you linking the subform to the main form, and is the combo box involved in that process? If so, it may simplify your life to simply link the two using the subform control properties.

      • #573718

        Hi Wendell,

        My combo box is on the main form. I took advantage of Access 97’s ability to link the form/subform through the linking properties of the subform. The combo box is not used in the process. I dynamically change the rowsource of the combo box for certain situations, but there is nothing more to it than setting the rowsource. The control source is blank.

        • #573737

          Well, I guess I don’t understand what you are doing from a RowSouce point of view. When you set it to pull up the data associated with the subform, that’s what is going to be displayed. It seems to me you have some circular stuff going on, but I don’t have enough detail to suggest what it is. Can you post a simplified version of your database?

    Viewing 1 reply thread
    Reply To: Unbound ComboBox Appears to be Bound (Accesss 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: