View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Wildcard character in MS Query

If your SQL is set up to use the LIKE operator, the code will accommodate
anything your parameter specifies.

Example:
WHERE City LIKE [Please enter City]

If the parameter equals: Paris
Only "Paris" entries will be returned.

However, if the parameter is: P*
All cities beginning with "P" will be returned.

Note: you may need to change the wildcard character to suit your DB.

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)


Just an asterisk returns all cities.
"Grd" wrote in message
...
Hi There,

I'm using a parameter for eg [Please enter City] in my MSQuery connecting
to
my SQL SErver database. How do I allow for an all option. I think it is
using
a wildcard but can't quite figure it out.

Any help greatly appreciated

Gordon