G Guest Jun 5, 2005 #1 I want to have a droplist in a roster type database in the Form Header to filter all records by a selected Department.
I want to have a droplist in a roster type database in the Form Header to filter all records by a selected Department.
G Guest Jun 5, 2005 #2 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
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