Access 2016 Cascading combo boxes

RCBricker

Well-known Member
Joined
Feb 4, 2003
Messages
1,560
Hello all,

I am building a form which will allow the user to add new claims. Two of the combo boxes are based on the same query.

What I would like to do is when they select the providers name from the first combo box, that the second combo box is populated only with the ID #s associated with that provider.

I have looked on line and found basically the following...

Code:
Cmbo_Provider_ID.RowSource = "Select Provider ID " & _
        "FROM tbl_CLAIMS Query " & _
        "WHERE Provider Name = " & Cmbo_Provider_Name.Value & "ORDER BY Provider ID"

but I get an error when trying it out.

Error:

Syntax error (missing operator) in query expression 'Provider ID'.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
NM I figured out my error.

aside from missing [] for table and field names with spaces, the Cmbo_Provider_Name.Value is text and needed some ' around it.
 
Upvote 0

Forum statistics

Threads
1,221,805
Messages
6,162,081
Members
451,738
Latest member
gaseremad

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top