simple select query variable question

  • Thread starter Thread starter John
  • Start date Start date
J

John

I haven't used Access in a couple of years but I used to know how to do
this.

Very simply I have one table of Products and I want to enter Criteria into
the Name field that will cause a dialog box to open when the query is run,
so that I can find a product by entering any part of it's name.

For today I was just entering:

Like "*search string*"

into the Criteria box, which works fine, but I want to be able to automate
this by making the query prompt me for the seach string instead of having to
modify it in Design View each time.

Thank you
 
Like "*" & [Enter the Product] & "*"

If you enter nothing, it should return all records.
 
John said:
I haven't used Access in a couple of years but I used to know how to
do this.

Very simply I have one table of Products and I want to enter Criteria
into the Name field that will cause a dialog box to open when the
query is run, so that I can find a product by entering any part of
it's name.
For today I was just entering:

Like "*search string*"

into the Criteria box, which works fine, but I want to be able to
automate this by making the query prompt me for the seach string
instead of having to modify it in Design View each time.
Like "*" & [Enter Search String] & "*"
 
Thanks everybody!


Bob Barrows said:
John said:
I haven't used Access in a couple of years but I used to know how to
do this.

Very simply I have one table of Products and I want to enter Criteria
into the Name field that will cause a dialog box to open when the
query is run, so that I can find a product by entering any part of
it's name.
For today I was just entering:

Like "*search string*"

into the Criteria box, which works fine, but I want to be able to
automate this by making the query prompt me for the seach string
instead of having to modify it in Design View each time.
Like "*" & [Enter Search String] & "*"
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
 
Back
Top