Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I would like to have the operator prompted for a "like" value. For
instance, I would like the operator to be prompted to enter the word PUSH if the description field contains PUSH anywhere in the description. This is a query using microsoft query which returns data to excel. For normal parameter queries you enter in the criteria something like [Enter value to search for]. That works on queries for "equal" conditions, but I can't figure out how to prompt for a "Like" condition that I want the user to be able to enter the parameter for. For instance I think I need to enter something like: Like "'%"[Enter value to search for]"%'" but that doesn't seem to work. I could write this in the SQL native if someone could give me an idea how to do that too, since the query criteria eventually gets generated into SQL anyway. Can anyone help me? This is a unique situation because of the LIKE and wild-card symbols. thanks, ga George Applegate |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Just a dump idea until you get a better one - you could have the criteria be:
Like [Enter Data] Then when the enter parameter value box appears type Data% For example if you are looking for a number that begins with 7: Enter Data: 7% This will bring up the needed info. "George Applegate" wrote: I would like to have the operator prompted for a "like" value. For instance, I would like the operator to be prompted to enter the word PUSH if the description field contains PUSH anywhere in the description. This is a query using microsoft query which returns data to excel. For normal parameter queries you enter in the criteria something like [Enter value to search for]. That works on queries for "equal" conditions, but I can't figure out how to prompt for a "Like" condition that I want the user to be able to enter the parameter for. For instance I think I need to enter something like: Like "'%"[Enter value to search for]"%'" but that doesn't seem to work. I could write this in the SQL native if someone could give me an idea how to do that too, since the query criteria eventually gets generated into SQL anyway. Can anyone help me? This is a unique situation because of the LIKE and wild-card symbols. thanks, ga George Applegate |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Randi -
This worked sort of...Once the query was created, in order to get a prompt message (I have two parms I'm prompting for) I had to go into the spreadsheet under Tools/Macro/Microsoft script editor and add the prompt string I wanted to show in the prompt box. But at least it is working . Thanks a ton for your suggestion and assistance. Putting in the % sign isn't a big price to pay. ga Randi wrote: Just a dump idea until you get a better one - you could have the criteria be: Like [Enter Data] Then when the enter parameter value box appears type Data% For example if you are looking for a number that begins with 7: Enter Data: 7% This will bring up the needed info. "George Applegate" wrote: I would like to have the operator prompted for a "like" value. For instance, I would like the operator to be prompted to enter the word PUSH if the description field contains PUSH anywhere in the description. This is a query using microsoft query which returns data to excel. For normal parameter queries you enter in the criteria something like [Enter value to search for]. That works on queries for "equal" conditions, but I can't figure out how to prompt for a "Like" condition that I want the user to be able to enter the parameter for. For instance I think I need to enter something like: Like "'%"[Enter value to search for]"%'" but that doesn't seem to work. I could write this in the SQL native if someone could give me an idea how to do that too, since the query criteria eventually gets generated into SQL anyway. Can anyone help me? This is a unique situation because of the LIKE and wild-card symbols. thanks, ga George Applegate George Applegate |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Solver not following parameters | Excel Worksheet Functions | |||
Too few parameters | Excel Discussion (Misc queries) | |||
too few parameters | Excel Discussion (Misc queries) | |||
Vlookup with to parameters | Excel Worksheet Functions | |||
Sort parameters | Excel Discussion (Misc queries) |