Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 706991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:13:39+00:00 2026-05-14T04:13:39+00:00

I’m having problems with a cascading combo box. Everything works fine with the combo

  • 0

I’m having problems with a cascading combo box. Everything works fine with the combo boxes and the values get populated correctly.

Private Sub cmbAdjComp_AfterUpdate()
Me.cboAdjOff.RowSource = "SELECT AdjusterCompanyOffice.ID, 
AdjusterCompanyOffice.Address1, 
AdjusterCompanyOffice.Address2, 
AdjusterCompanyOffice.Address3, 
AdjusterCompanyOffice.Address4, 
AdjusterCompanyOffice.Address5 FROM" & _
" AdjusterCompanyOffice WHERE 
AdjusterCompanyOffice.AdjCompID = " & Me.cmbAdjComp.Column(1) & _
" ORDER BY AdjusterCompanyOffice.Address1"
Me.cboAdjOff = Me.cboAdjOff.ItemData(0)
End Sub

The secondary combo box has a row source query:

SELECT AdjusterCompanyOffice.ID, AdjusterCompanyOffice.Address1,    
AdjusterCompanyOffice.Address2, AdjusterCompanyOffice.Address3,
 AdjusterCompanyOffice.Address4, AdjusterCompanyOffice.Address5 FROM 
 AdjusterCompanyOffice ORDER BY AdjusterCompanyOffice.Address1;

Both comboboxes have the same controlsource.

Everything works fine and dandy moving between records and the boxes show the correct fields for each record.

When i use the first combo box, and then select the appropriate option in the second combo box, everything works great on the specific record.

However when I move to the next record, the values in the second combo box are all empty. If i close the form and reopen it, and avoid using the cascading combo boxes all the values are all correct when i move between records.

Somehow using the cascading combo boxes creates a conflict with the row source of the secondary combo box.

Hope that is clear! Have been rummaging around for an answer but cant find anything.

any help would be greatly appreciated.

Thanks

Noel

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:13:39+00:00Added an answer on May 14, 2026 at 4:13 am

    The reason why the combo box is blank when you navigate to the next record is because you have NotInList set to TRUE (which is what you want), but when you arrive on the record, the rowsource has been filtered to not include the value stored in the field the combo box is bound to. Thus, it’s blank — the value is there, but it can’t be displayed, since it’s not in the list.

    To fix this, you need to clear the filter on the second combo box. To do that, in the OnCurrent event of your form, set the rowsource of the filtered combo box to be unfiltered:

      Me!cboAdjOff.RowSource = "SELECT AdjusterCompanyOffice.ID, AdjusterCompanyOffice.Address1, AdjusterCompanyOffice.Address2, AdjusterCompanyOffice.Address3, AdjusterCompanyOffice.Address4, AdjusterCompanyOffice.Address5 FROM AdjusterCompanyOffice ORDER BY AdjusterCompanyOffice.Address1"
    

    I usually handle this by creating two constants at the top of the form’s module, one for the SELECT statement and one for the ORDER BY:

      cstrRecordsourceSelect = "SELECT AdjusterCompanyOffice.ID, AdjusterCompanyOffice.Address1, AdjusterCompanyOffice.Address2, AdjusterCompanyOffice.Address3, AdjusterCompanyOffice.Address4, AdjusterCompanyOffice.Address5 FROM AdjusterCompanyOffice"
      cstrRecordsourceOrderBy = "ORDER BY AdjusterCompanyOffice.Address1"
    

    Then it’s much easier to handle. In the OnCurrent it looks like this:

      Me!cboAdjOff.RowSource = cstrRecordsourceSelect & " " & cstrRecordsourceSelect 
    

    …and in the AfterUpdate of your first combo box:

      Me!cboAdjOff.RowSource = cstrRecordsourceSelect & _
        "WHERE AdjusterCompanyOffice.AdjCompID = " & Me!cmbAdjComp.Column(1) & _
        " " & cstrRecordsourceSelect
    

    This makes the code easier to read, and it also makes it easier to alter the rowsource if you need to, since you have to edit only the constant.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.