Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002

    Unanswered: refreshing combo boxes

    I have two combo boxes on a form. The 2nd is dependant on data displayed on the first. The second combo box for some reason will only show the listings correctly the first time. If I change the first combo the 2nd combo boxes items will not refresh. I've tried adding docmd.requery to "on click" events on the second combo box but it didn't work. Does anyone have any ideas that would correct this?

  2. #2
    Join Date
    Feb 2002
    Try requerying the 2 nd combo from the onchange event of the first combo box.

  3. #3
    Join Date
    Jun 2002
    Mpls/St.Paul area
    dynamictiger offers a good solution
    - update onchange or
    - update on exit or
    - update after update

    - Also, perhaps you need to do more than requery. Perhaps you should have the on exit function of the first combo box call a function to update the row source of the second combo box. For example...

    Private Sub cboComboBox1.AfterUpdate()
    'this updates the second combo based on new value of the first
    cboComboBox2.rowsource = ""SELECT tblExample.Criteria FROM tblExample WHERE (((tblCase.Criteria) = Me.cboComboBox1;"
    end sub
    This is the day the Lord has made, I will rejoice and be glad in it.

Posting Permissions

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