How do I create a droplist filter?

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

Guest

I want to have a droplist in a roster type database in the Form Header to
filter all records by a selected Department.
 
I generally cheat,

I build the query string to I want then change the
"WHERE [Department]=1" to "WHERE [Department]=<NEEDTOFILTERTHIS>"

I then store this query in the TAG of the combobox.

then in your case probably on the AfterUpdate of the combo box that selects
the Deparment you want to filter by put in this code

cmbRosterType.rowsource =
replace(cmbrostertype.tag,"<NEEDTOFILTERTHIS>",cmbdepartment.value)

cmbRosterType.requery

this has worked for me in the past.

Regards,

Michael Proctor
NTDS
 

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

Back
Top