T
timglass via AccessMonster.com
I have created a database for tracking hours worked. I now need to create a
way for users to sort through the data. I have four fields that I need to
sort through using a form with combo boxes. The only problem that I have is
how do I use a wilcard character, *, in the combo boxes so that if the user
wants to select all the information in one or more of the fields how do I do
that? I posted this question about a week ago and was given a select
statement to use but have not been able to get it to work.
You can add the * to your combos by using a technique like this:
SELECT EmployeeNum FROM tbllkEmployee UNION Select "*" as Bogus From
tbllkEmployee;
Then in the criteria, wrap LIKE around all your control references
LIKE([Forms]![MyFormName]![MyCombo])
If the user selects the *, then it evaluates to LIKE(*) which will return
everything.
Any help is greatly appreciated.
way for users to sort through the data. I have four fields that I need to
sort through using a form with combo boxes. The only problem that I have is
how do I use a wilcard character, *, in the combo boxes so that if the user
wants to select all the information in one or more of the fields how do I do
that? I posted this question about a week ago and was given a select
statement to use but have not been able to get it to work.
You can add the * to your combos by using a technique like this:
SELECT EmployeeNum FROM tbllkEmployee UNION Select "*" as Bogus From
tbllkEmployee;
Then in the criteria, wrap LIKE around all your control references
LIKE([Forms]![MyFormName]![MyCombo])
If the user selects the *, then it evaluates to LIKE(*) which will return
everything.
Any help is greatly appreciated.