Changing a Query

savix

Registered User.
Local time
Today, 23:42
Joined
Jun 17, 2005
Messages
10
Hi,
How can I change certain values of an SQL query with a macro? What I'm trying to do, is to adapt the queries to the specifications of my forms.
Thanks for your help

Sav
 
Code:
mySQL = "SELECT * FROM myTable WHERE field1 = '" & TextBox1.Value & "' AND field2 = '" & TextBox2.Value & "'"

CurrentDB.QueryDefs("myQuery").SQL = mySQL

HTH
 
thanx!....
 

Users who are viewing this thread

Back
Top Bottom