Showing related records only

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a form, where 2 fields are filled from comboboxes,
which are related. Eg. one may contain makes, and the other models. If the
user selects a specific make from the first combobox, I want the second
combobox to only show models related to that make. How do I do this?
 
kassie,
Use the value of combo1 (ex. cboMake) to filter the contents of combo2 (ex. cboModel).
In your example, in the query behind cboModel, you would filter the Make field with a
criteria of...
= Forms!YourFormName!cboMake
Also, always use a
cboModel.Requery
command on the AfterUpdate event of cboMake... so that whenever a selection is made in
cboMake... cboModel will be correctly filtered.

On my website below, I have a sample file that demonstrates this "Synched Combos"
technique.
 
I am trying to create a form, where 2 fields are filled from comboboxes,
which are related. Eg. one may contain makes, and the other models. If the
user selects a specific make from the first combobox, I want the second
combobox to only show models related to that make. How do I do this?

Cascading ComboBoxes: http://www.fontstuff.com/access/acctut10.htm
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
Asked and answered very very often.

Please read the previous posts before starting a new thread. A search for
"cascading combo" or "dependant combo" will most likely get you several
examples.
 
Back
Top