Updating criteria in multiple queries (1 Viewer)

Prototype

Registered User.
Local time
Today, 11:47
Joined
Mar 26, 2017
Messages
11
Hello everyone:

I have multiple queries in my database that have the same criteria. Would anyone happen to know if there is a way to change and update them all at once?

Thanks.
 

isladogs

MVP / VIP
Local time
Today, 15:47
Joined
Jan 14, 2017
Messages
18,186
You could write all queries as SQL statements in the format. :

Code:
strSQL = strSELECT & strWHERE & strORDERBY

Then precede all the statements with
Code:
strWHERE = your criteria
 

plog

Banishment Pending
Local time
Today, 10:47
Joined
May 11, 2011
Messages
11,611
You would create a base query, apply all overriding criteria there. Then build your subsequent queries using that query.
 

Prototype

Registered User.
Local time
Today, 11:47
Joined
Mar 26, 2017
Messages
11
Thanks so much plog and ridders. I appreciate it.

It still doesn't make sense to me. This is a feature I am interested in exploring. Would you be able to provide me more direction on this?

Thanks once again.
 

Prototype

Registered User.
Local time
Today, 11:47
Joined
Mar 26, 2017
Messages
11
Does anyone have a sample database that shows the setup for these queries?

Thank you.
 

MarkK

bit cruncher
Local time
Today, 08:47
Joined
Mar 17, 2004
Messages
8,178
Why do you need to update all your queries? This requirement is unusual. Commonly people write queries that drive forms, and then allow the user to filter said forms in various ways. It seems unusual to need to update all the WHERE clauses as a batch.

One idea is to use parameters in your queries that draw data from open forms. In a case like this the user edits the value in the form, and opens the query. The query reads the value from the form, and done. No need to edit the criteria directly, because the query looks to the open form for data. But again, what are you trying to do? Show your work.

hth
Mark
 

Users who are viewing this thread

Top Bottom