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
 
Back
Top