
unbound drop-down list box to limit the values in another drop-down list box
Here's a code snippet I picked up from Blaire a while ago. It works for
me...
======Blaire writes======
You Filter the criteria of the Associations in the query of the Second Combo
box...
First Combo
"Select * From Associations"
Add Event Code...
Private Sub FirstCombo_AfterUpdate()
Me.FirstCombo.Requery
End Sub
Second Combo
"Select * From Members Where Association = " &
FormName.ComboName!Association
The second combo will filter to the current value in the first combo...
(Make sure the datatypes are the same...)
Blaire Comrie
HTH,
Jim
Quote:
> not sure i would use an unbound list box -
> the way i would do it is have the record source of list 2 be a query that
> has the CRITERIA of the "category"(list box 1) as selected in list box
one -
> you can use the expression builder to get the syntax correct.
> let us know how you get on
> Julie
> > Ok heres the problem,
> > We would like to make a database that will track our IT
> > eqipment. We would like to be able to find out what we
> > have in stock. I need to make my drop down lists limit the
> > content of the next drop down list.
> > eg. Mrs picky wants a new sound card for her computer, so
> > i select 'sound' from the first drop down list and the
> > next drop down list limits to entrys within sound and
> > dispays things like 'cards' 'speakers' 'earphones'. So now
> > i select 'cards' and the next drop down list give me types
> > of cards 'soundblaster' 'generic'.
> > It says in the help files i can use a "unbound drop-down
> > list box to limit the values in another drop-down list
> > box" but does not go on the tell me how!
> > Please help us!
> > Cat