froggiebeckie
Registered User.
- Local time
- Today, 10:27
- Joined
- Oct 11, 2002
- Messages
- 104
Hey, all.
I've done a load of searching and with the help of a slew of posts on this forum and others, was able to construct a flexible search form to run a query with up to 7 criteria selected from individual combo boxes. The query is run from a button on the main form.
Criteria in the query is like this for each of the 7 fields:
If none of the criteria is selected, the query will return ALL the records.
I was also able to get the query results to show in a sub form.
I'm really quite happy with the (almost) end product, but have one stumbling block that I haven't been able to work through or around.
When the form/sub form is opened, the query runs. Since there were no criteria selected, the query returns all the records, which is going to confuse the crap out of my end users.
Is there a simple way to either run the query only on the button click, or only show the subform on requery?
Thanks in advance for looking.
BeckieO
I've done a load of searching and with the help of a slew of posts on this forum and others, was able to construct a flexible search form to run a query with up to 7 criteria selected from individual combo boxes. The query is run from a button on the main form.
Criteria in the query is like this for each of the 7 fields:
Code:
Like (IIf(IsNull([Forms]![EngSearchFrm]![Requestor]),"*",([Forms]![EngSearchFrm]![Requestor])))
I was also able to get the query results to show in a sub form.
I'm really quite happy with the (almost) end product, but have one stumbling block that I haven't been able to work through or around.
When the form/sub form is opened, the query runs. Since there were no criteria selected, the query returns all the records, which is going to confuse the crap out of my end users.
Is there a simple way to either run the query only on the button click, or only show the subform on requery?
Thanks in advance for looking.
BeckieO