Storing the user input of a parameter query.

  • Thread starter Thread starter skhan20
  • Start date Start date
S

skhan20

Guest
Hi,

How do you store the user input in a variable so that it can be used later on within the same parameter query ?

eg. In the following QUERY:-

SELECT name
FROM DOCLIST
WHERE bookName LIKE "*" & [Search word: ] & "*";

I would like to store the user input in a variable, so that I can use it later on within the same select clause.

I mean I want to do this:-

SELECT name
FROM DOCLIST
WHERE bookName LIKE "*" & [Search word: ] & "*"
UNION
SELECT author
FROM AUTHORLIST
WHERE title LIKE "*" & [Search word: ] & "*";


DOCLIST & AUTHORLIST are seperate tables with different set of fields & different data on it.


I don't want to prompt the user twice. I would like to store the first input in a variable so that I can use it later on.

Thanx in advance.

----------------------------SAKIB
 
See your post in General and pleasae post 1 time only.
 
If the second input would appear on some other form, you could pass the first input to the second form and have it detected automagically.

Look up the OpenForm method.
 

Users who are viewing this thread

Back
Top Bottom