I am new to Access and am having a problem. I have three cascading combo boxes in Access 2007 on a form. Two of them work perfectly, but the third one gives me an error "The expression is typed incorrectly, or it is too complex to be evaluated." I have tracked it down to the WHERE statement in the Query, but the statement is the exact same as the other Queries. Maybe I need different code to get a third cascade?
Tables are Assets, Category, Make and Model.
Queries are Make Query and Model Query.
Form is Asset Details.
First combo box is cboCategory that pulls from the Category table. It has an AfterUpdate event to requery the cboManufacturer combo box. Coded like this:
Second combo box is cboManufacturer that uses the Make Query to look at cboCategory to determine what to show. SQL looks like:
This combo box works perfectly. It has an After Update event to update cboModel. Code:
Third combo box is cboModel that uses the Model Query to look at cboManufacturer to determine what to show. SQL looks like:
The WHERE statement above is the problem, but it looks like it should work. Maybe you just cant have two dependant combo boxes on one form?
I have attached a copy of a simplified version of the database. I am in the process of modifying a template and still weeding out parts I don't need. So far everything else works fine.
Any help is appreciated. Thanks.
Marc
Tables are Assets, Category, Make and Model.
Queries are Make Query and Model Query.
Form is Asset Details.
First combo box is cboCategory that pulls from the Category table. It has an AfterUpdate event to requery the cboManufacturer combo box. Coded like this:
Code:
Private Sub cboCategory_AfterUpdate()
Me.cboManufacturer.Requery
End Sub
Code:
SELECT Make.MakeID, Make.Make, Make.Category FROM Make WHERE (((Make.Category)=[Forms]![Asset Details]![Category])) ORDER BY Make.Make;
Code:
Private Sub cboManufacturer_AfterUpdate()
Me.cboModel.Requery
End Sub
Third combo box is cboModel that uses the Model Query to look at cboManufacturer to determine what to show. SQL looks like:
Code:
SELECT Model.ModelID, Model.Model, Model.Make FROM Model WHERE (((Model.Make)=[Forms]![Asset Details]![Manufacturer])) ORDER BY Model.Model;
I have attached a copy of a simplified version of the database. I am in the process of modifying a template and still weeding out parts I don't need. So far everything else works fine.
Any help is appreciated. Thanks.
Marc
Comment