S
Steve Stad
I have a union query that appends fields from several tables based on a given
criteria, e.g., id like *30060.
Example:
Select [tblJAN].field1, [tblJAN].field2, [tblJAN].field3, [tblJAN].id
From [tblJAN]
HAVING [tblJAN].id LIKE "*30060"
UNION SELCECT [tblFEB].field1, [tblFEB].field2, [tblFEB].field3, [tblFEB].id
From [tblFEB]
HAVING [tblFEB].id LIKE "*30060"
The query actually appends more fields from about 12 or more monthly tables
based on the same criteria, e.g., id like *30060. I would like to be able
to change
the value of the id variable on the fly in order to reuse the union query
for other
id values - Without having to copy/edit/paste the entire query in and out of
access. Is there a way for the union query to read a variable in a table so
I can update the variable in the table and then run the query.
Thanks,
criteria, e.g., id like *30060.
Example:
Select [tblJAN].field1, [tblJAN].field2, [tblJAN].field3, [tblJAN].id
From [tblJAN]
HAVING [tblJAN].id LIKE "*30060"
UNION SELCECT [tblFEB].field1, [tblFEB].field2, [tblFEB].field3, [tblFEB].id
From [tblFEB]
HAVING [tblFEB].id LIKE "*30060"
The query actually appends more fields from about 12 or more monthly tables
based on the same criteria, e.g., id like *30060. I would like to be able
to change
the value of the id variable on the fly in order to reuse the union query
for other
id values - Without having to copy/edit/paste the entire query in and out of
access. Is there a way for the union query to read a variable in a table so
I can update the variable in the table and then run the query.
Thanks,