J
Jeanne
Preface: I use RunSQL successfully with SQL Select statements in many
projects. So, it’s doable.
I don’t do this for a living, am Access db for Dummies user. Where I copied
the code, and up till now it worked.
Dan, if you’re reading this, tried your link, it didn’t work.
Also, you may know more elegant solutions but I’d appreciate if I could get
feedback on the below.
Receive RunTime error ‘2342’
A RunSQL action requires an argument consisting on an SQL statement.
My “References†in Tools include “Microsoft ActiveX DataObjects 2.1 Library.
I have this same code running in other applications – no problem.
In this same application I have an SQL Select statement running using this
same Recordset definition -- no problem
Dim cnn2 As ADODB.Connection
Set cnn2 = CurrentProject.Connection
Dim RcdSet2 As New ADODB.Recordset
RcdSet2.ActiveConnection = cnn2
Dim sSQL As String
sSQL = "SELECT COA_Checking.* FROM COA_Checking"
DoCmd.RunSQL sSQL
I’m thinking there is something up with my Project set up.
projects. So, it’s doable.
I don’t do this for a living, am Access db for Dummies user. Where I copied
the code, and up till now it worked.
Dan, if you’re reading this, tried your link, it didn’t work.
Also, you may know more elegant solutions but I’d appreciate if I could get
feedback on the below.
Receive RunTime error ‘2342’
A RunSQL action requires an argument consisting on an SQL statement.
My “References†in Tools include “Microsoft ActiveX DataObjects 2.1 Library.
I have this same code running in other applications – no problem.
In this same application I have an SQL Select statement running using this
same Recordset definition -- no problem
Dim cnn2 As ADODB.Connection
Set cnn2 = CurrentProject.Connection
Dim RcdSet2 As New ADODB.Recordset
RcdSet2.ActiveConnection = cnn2
Dim sSQL As String
sSQL = "SELECT COA_Checking.* FROM COA_Checking"
DoCmd.RunSQL sSQL
I’m thinking there is something up with my Project set up.