D
DoDev
I am having problems with setting form's recordset property.
My subform's form_load event sub includes the following code:
Private WithEvents rstA As ADODB.Recordset
Dim SQLStmt As String
Set rstA = New ADODB.Recordset
SQLStmt = "SELECT * FROM tblA"
rstA.Open SQLStmt, CurrentProject.Connection, _
adOpenDynamic, adLockOptimistic
Set Me.Recordset = rstA
The last causes the following VB error: "the object you entered is not a
valid recordset propertyâ€
I use Access 2007. Reference is set to : Microsoft ActiveX Data Objects 2.8
Library.
I will very much appreciate your help.
Thanks.
DoDev
My subform's form_load event sub includes the following code:
Private WithEvents rstA As ADODB.Recordset
Dim SQLStmt As String
Set rstA = New ADODB.Recordset
SQLStmt = "SELECT * FROM tblA"
rstA.Open SQLStmt, CurrentProject.Connection, _
adOpenDynamic, adLockOptimistic
Set Me.Recordset = rstA
The last causes the following VB error: "the object you entered is not a
valid recordset propertyâ€
I use Access 2007. Reference is set to : Microsoft ActiveX Data Objects 2.8
Library.
I will very much appreciate your help.
Thanks.
DoDev