Eliminating several queries that do the same thing? (1 Viewer)

Z34Lee

Registered User.
Local time
Today, 01:17
Joined
Dec 8, 2006
Messages
22
I have many queries that all do the same thing. The problem is that they're connected to specific controls on a form, so I have to make a new query everytime I make a new form to perform the same task as the others. This would be eliminated if there was a way to use the criteria the same way you would in code, like Me!controlname. Is there anyway possible to make these queries more universal so that they can be used by many forms?
 

FoFa

Registered User.
Local time
Today, 00:17
Joined
Jan 29, 2003
Messages
3,672
You could have a VBA script to create (change) a single query to point to different criteria (modify the SQL actually). As long as it isn't a shared system and the queries are not on the shared part.
OR
You can create an invisible form, and put your criteria in fields on the invisible form and use that in the query. Then each button just has to populate the invisible form.
 

Users who are viewing this thread

Top Bottom