show all the records or specfic records

cardgunner

Registered User.
Local time
Today, 14:26
Joined
Aug 8, 2005
Messages
210
What is the syntax I need to use in the criteria of a query that will show all the records if I don't specify what the parameter value should be?

So If I don't specify what the paremeter should be and just hit ok with the value blank it will return all the records?

I have tried to use
Like "*" or [parameter]
but when I specify the value of the parameter it still returns all the records:confused:
 
This may work for you:

Like "*" & [promptme]

There may be cases where it wouldn't work...
 
Like "*" & [promptme]

There may be cases where it wouldn't work...

That works. Thank you.

But I'm puzzled at why it does. I know in SQL it's an or clause such as @prompt='' or fieldname=@prompt. The or makes sense to me it's either all or the criteria specified.

Can you give me an example where this wouldn't work?
 
Off the top of my head the example that jumps out is where you may be looking for say, the word "red". The query would return anything that ended in "red" because the astrick is on the left side.
 
Off the top of my head the example that jumps out is where you may be looking for say, the word "red". The query would return anything that ended in "red" because the astrick is on the left side.

Oh... that is not good. It may work for now but I'll have to keep looking.
 
I would suggest you use a popup form to run the report and get the var if one is used/needed.
 

Users who are viewing this thread

Back
Top Bottom