filter listbox values

G

Gavin

Hi could someone explain how i can filter a listbox's
values based on the value selected in a previous field?

I have a list of team names in a drop down menu, i would
like it so that when a user selects a team, the next
listbox only contains members of staff in that team.

Hope anyone can help, thanks.

Gavin
 
W

Wayne Morgan

Use a query for the Row Source of the listbox. In the query, set the
parameter for the Team field to the value of the combo box. In the
AfterUpdate event of the combo box, requery the listbox.

Example?
Me.lstMyListbox.Requery

Referring to the combo box in the query's criteria:
=Forms!frmMyForm!cboMyCombo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top