G
Gary S
I am having a problem with ADO. See the following simplified code:
Dim rsIndex1 As New ADODB.Recordset
rsIndex1.Open "[ReportingCreateIndexQry]", CurrentProject.Connection,
adOpenForwardOnly, adLockReadOnly
MsgBox "reportname"
This code works fine unless in the above query I am using selection criteria
that is referencing an open form. I get the following error message:
"Invalid SQL Statement; expected 'delete','insert',etc".
The selection criteria looks like "[Forms]![Reporting frm]![person combo box]"
FYI-the query runs fine if when I run it.
Can someone help me unserstand why this is not working? Thanks!
--------------------------------------------------------------------------------
Dim rsIndex1 As New ADODB.Recordset
rsIndex1.Open "[ReportingCreateIndexQry]", CurrentProject.Connection,
adOpenForwardOnly, adLockReadOnly
MsgBox "reportname"
This code works fine unless in the above query I am using selection criteria
that is referencing an open form. I get the following error message:
"Invalid SQL Statement; expected 'delete','insert',etc".
The selection criteria looks like "[Forms]![Reporting frm]![person combo box]"
FYI-the query runs fine if when I run it.
Can someone help me unserstand why this is not working? Thanks!
--------------------------------------------------------------------------------