filtering forms and related combo boxes

J

Jim

My library database includes a form (frmBooks) that contains a field
which indicates the location of the books. If locationID =1, books are
in the Main Library; if locationID =2, they are in the Resource Center.

I've used an option group to filter frmBooks so that the librarians can
see all the titles, or only those in either of the two locations.

The code in the afterupdate event of grpFilterChoice on the frmBooks reads:
'Apply or remove the filter options of the user's choice
Select Case grpFilterChoice
Case 1
Me.FilterOn = False
Case 2 ' Filter on main library
Me.Filter = "locationID = 1"
Me.FilterOn = True 'apply the filter
Case 3 ' filter on Resource Center
Me.Filter = "locationID =2"
Me.FilterOn = True
End Select
Me.Requery

OK so far.

However, the frmBooks also contains three combo boxes. (cboFindSubject,
cboFindTitle, and cboFindAuthor). They still show a drop down of all
records regardless of the filter.

How do I code the combo boxes to match the filter when I apply it? Where
do I put that code?

Thanks!

--Jim
 

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