Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXCEL and MS Query Question - PLEASE HELP

Status
Not open for further replies.

keefb

Technical User
Mar 18, 2002
65
GB
Microsoft SQL Query

I have a SQL data base which has very little reporting functionality, therefore I use ms query via Excel.

This I have little working knowledge but can get most reports created.

I have created a spread sheet which accesses the query and returns the information as required.

What I would like to do is open the spread sheet and either add another worksheet to the spreadsheet and have a key word to use as a input into the query OR get the query to prompt for input on opening.

I can get this to work if I edit the query each time and use like '%text%' and this works ok, but I can't seem to get the like funtion to work as a prompt.

If I set the like function as : like [ enter text ]

this will give me a pop up which I can enter text, but the search is then a literal search and doesn't use wildcards, does anyone know how to get this "prompted" search to use wild cards?

Any help would be very very much apprecaited.

Regards
KeefB

[lightsaber]
 
Hi Keef,

Reporting off an Access database I got the following working:

SQL:
WHERE (Klanten.Land Like '%' & ? & '%')

In Criteria:
Like '%' & [Enter letter] & '%'

in fact using the & to concatenate the pieces of the like phrase with the parameter.

Ilses
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top