Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Serbia and Montenegro (Yugoslavia)
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unbound ComboBox Appears to be Bound (Accesss 97)

    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.

  2. #2
    Star Lounger
    Join Date
    Aug 2001
    Location
    Seattle, Washington, USA
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Unbound ComboBox Appears to be Bound (Accesss 97)

    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

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Serbia and Montenegro (Yugoslavia)
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Unbound ComboBox Appears to be Bound (Accesss 97)

    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.

  4. #4
    Star Lounger
    Join Date
    Aug 2001
    Location
    Seattle, Washington, USA
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Unbound ComboBox Appears to be Bound (Accesss 97)

    Mike,

    You're absolutely right! (And I feel absolutely foolish.) <img src=/S/blush.gif border=0 alt=blush width=15 height=15> <img src=/S/blush.gif border=0 alt=blush width=15 height=15> <img src=/S/blush.gif border=0 alt=blush width=15 height=15>

    (Well, maybe others can be <img src=/S/rofl.gif border=0 alt=rofl width=15 height=15> over this.)

    My apologies.

    Tom

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Serbia and Montenegro (Yugoslavia)
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Unbound ComboBox Appears to be Bound (Accesss 97)

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

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Unbound ComboBox Appears to be Bound (Accesss 97)

    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.
    Wendell

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Serbia and Montenegro (Yugoslavia)
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Unbound ComboBox Appears to be Bound (Accesss 97)

    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.

  8. #8
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Unbound ComboBox Appears to be Bound (Accesss 97)

    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?
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •