Question about QUery

king07

Registered User.
Local time
Today, 11:39
Joined
Jan 8, 2007
Messages
24
Morning everyone

I am stumped with a query i am doing. I have my query setup and a dialog box for my users to select their parameters for what they want to search fo. When i test it though-- and use the combo boxes the whole table comes up and not just the search criteria i have entered.... any suggestions??
 
You've offered very little information, so I'm forced to guess, but...
1) if you've got a parameter query with multiple parameters,
2) and each one uses a "Like" clause
3) and these are "ANDed" together in the query's WHERE clause
4) and one of them is not supplied by the user and evaluates to ""
5) then your query will always return all the records in your table.
5b) unless the user specifies data for ALL the search parameters.
Generally, I'd dynamically create the SQL WHERE clause using only the fields for which the user has specified data, and not a parameter query.
 

Users who are viewing this thread

Back
Top Bottom