Cascading combo boxes

vX987

Registered User.
Local time
Today, 15:45
Joined
Jun 29, 2007
Messages
51
nevermind, somehow I got it to work :) HOWEVER... there is one simple syntax that I am messing up on. I put

[Forms]![this is where I put the name of my form]![cboDiagnosis]

in the criteria section of the Query Builder grid and it works fine if I ONLY open up that one form [Diagnosis], BUT the form where the combo boxes are in [Diagnosis] will actually be a subform in another bigger form [frmMain]. Everytime I open up [frmMain], I get a

"Enter Parameter Value for [Forms]![Diagnosis]![cboDiagnosis], popup".

How would I write the syntax to make it function properly.

This is where I received the example..
http://office.microsoft.com/en-us/access/HA011730581033.aspx

Thanks in advance.
 
Last edited:
Carry multiple columns that contain the subcategories, and filter each subsequent combobox by that. For example:

Code:
[u]ComboBox1:[/u]

SubCategory   Description
1             Ailment A
1             Ailment B
2             Ailment C
.             .
x             x

Once a choice is made in ComboBox1 (captured with the ComboBox's OnChange event), set the next combobox's RecordSource to that SubCategory, as in:

Code:
ComboBox2.RecordSource = "SELECT * FROM SomeTable WHERE Category=" & ComboBox1.SubCategory
ComboBox2.Requery
 

Users who are viewing this thread

Back
Top Bottom