Hi!... Can you alter query criteria through code?

paulmcdonnell

Ready to Help
Local time
Today, 11:49
Joined
Apr 11, 2001
Messages
167
Hi guys,

I have a query which i want to change the criteria of, depending on the control that was clicked from a form.

This means that a form uses a query as its recordsource. Some controls on the form choose different queries for the form recordsource.

I want one of the controls to use the same query but alter the query critera, so that i don't have six or seven separate queries but have one where the criteria can change slightly on the click of a command button..

is this possible

Hope you guys can help

Cheers
paul
 
If you are using Access tables, you can simply set up a parameter query to do this.

For linked tables, you'll need to actually modify the query itself in code. Look up the Microsoft Knowledge Base article Q131534.
 

Users who are viewing this thread

Back
Top Bottom