Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Synchronizing Two Combo Boxes

Status
Not open for further replies.

CharlieT302

Instructor
Mar 17, 2005
406
US
Hi Folks,

I have one combo box with the following value list:
Basic
Security
Disabled

I have another combo box which pulls from a table called:
tbl_features. It contains two fields:
Feature and Category.

Each feature is assigned one of the three category values listed above.

If the user selects "Basic" on Combo1, I want Combo2 to filter its list by that value.

When I apply my code, it creates a parameter query instead.

Heres the exact code:
If [Category] = "Basic" Then GoTo Basic_Pop Else GoTo Check_two

Basic_Pop:

Me![Feature].RowSource = "SELECT tbl_Available_Features_list.Feature, tbl_Available_Features_list.Category FROM tbl_Available_Features_list WHERE (((tbl_Available_Features_list.Category)=Basic))

Instead of filtering the Combo2, it creates a parameter query in the underlying Row Source. The problem seems to be centered around the word: "Basic" If I place quotes around it (as in a normal query) it produces a syntax error.

Any Ideas?
 
The answer is here: thread702-1313164

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top