S
sheela
I am having problem in designing parameter query, where
users can search records from a table. I am using a
parameter query. What I need is: If the user doesn't type
any thing in the parameter values, the query should show
all the records. Otherwise if the user types some thing,
the results should show according the parameter values he
typed.
The query looks as follows, except my original query has
lot more fields in the search criteria:
SELECT TableName.Field1, TableName.Field2, TableName.Field3
FROM TableName
WHERE (((TableName.Field1) Like ([param1]) & "*")
AND ((TableName.Field2) Like ([param2]) & "*")
AND ((TableName.Field3) Like ([param3] & "*") );
This query always gives zero records; even it is supposed
to show some records. Could someone please help me in
this search?
users can search records from a table. I am using a
parameter query. What I need is: If the user doesn't type
any thing in the parameter values, the query should show
all the records. Otherwise if the user types some thing,
the results should show according the parameter values he
typed.
The query looks as follows, except my original query has
lot more fields in the search criteria:
SELECT TableName.Field1, TableName.Field2, TableName.Field3
FROM TableName
WHERE (((TableName.Field1) Like ([param1]) & "*")
AND ((TableName.Field2) Like ([param2]) & "*")
AND ((TableName.Field3) Like ([param3] & "*") );
This query always gives zero records; even it is supposed
to show some records. Could someone please help me in
this search?