QueryDef using ADO

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

I am using Access 2000. I would like to create a querydef
in VBA using ADO. What I would like to do is create a SQL
string "strSQL=Insert into tblCustomer..." and use this
string to create my querydef and then execute the action
query. Here is the DAO code:

Set DB = CurrentDb()
Set ActionQuery = DB.CreateQueryDef("", strSQL)
ActionQuery.Execute dbFailOnError

I need to know the syntax for accomplishing the above
using ADO. Thanks.
 
Back
Top