I should read "creating" a query - Here's what I'm working with - the error I get is Object required db.
Sub SaveQuery(strQuery)
dim db
'Set up Connection
set con=Server.CreateObject("ADODB.Connection"
'Set up Provider
db="Provider=Microsoft.Jet.OLEDB.4.0;" & _
"data source=.............. etc.
' Open the database
con.open db
dq = Querydef
qd = db.CreateQueryDef("qryCampaign", strQuery)
If FailOnError Then
qd.Execute (DB_FAILONERROR)
Else
qd.Execute
End If
qd.Close
Set qd = Nothing
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.