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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access cascading combo box help :)

Status
Not open for further replies.

sjanssen

Technical User
Aug 9, 2010
9
US
I have a form with which I'm trying to create a cascading combo box. The form will contain two drop down boxes, one for vehicle make and one for vehicle model. I would like to be able to set the model to be contingent upon the make. For example, if I pull down Toyota, I only want to see Camry, Corolla, Tercel etc. So far, I have created the make table (vehmake) to include the following columns, makeid (primary key), Code (TOYT), Make (Toyota). I have created the model table, (vehmodel) to include modelid (primary key), Code (COR), Model (Corolla), and Makeid (foreign key). I have created the join, and the vehmake table allows me to view all models under each make. However, when I put the controls on the form, I can't get the models to reflect the current make I've selected. Is there a query I need to develop?? Any help would be so very appreciated. I'm an access newbie :)
 
Easiest way is to create a query for your 2nd combo box, and in that query, add a condition under your ForeignKey that says something like:
Forms![MyFormName]![ControlBoxMake]

If you have Office 2010, as you start typing that condition in, it'll give you an autofill drop-down which is NICE NICE NICE... helps to avoid typos.


"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
glad it worked out.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top