Only as the user once.
Check out "parameter_query" in the VBA help.
NickHK
"Keith" wrote in message
...
I have a spreadsheet that gets it data from an external source. I have a
query setup that refreshed the data.
However, I need input from the user to say what month and year they want
to
see. This works fine except for 2 things. Firstly when I run the query
with
the query window open you get the window and it says whatever you called
your
variable. I make the name something like "What Month", but when in normal
use
(the query window is not open) the window doesn't display the variable
name.
How can I get the input window to tell the user what it wants?
My second problem is that there is an OR statement in the query. This
means
that although the variables input by the user stay the same, the user has
to
put them in twice, once for each OR line in the query. I have given the
two
lines the same variable names, but the system still asks twice. How can I
stop this from happening? I have a new sheet to produce and it will have 4
OR
statements meaning the input of the same information 4 times.
|