G
Guest
I have a query that works fine. It has a WHERE clause "WHERE ID =
[Forms]![frmForm]![RecID]"
When I open a report and do this
strSQL = "SELECT * From qryMyQuery"
rs.open strSQL currentproject.connection
I get a parameter error.
It seems I cannot use the query as SQL for an rs.open ??
When I copied in the query SQL source and changed to
"WHERE ID =" & [Forms]![frmForm]![RecID].
it worked.
Is there any way I can use my query as is in the rs.open statement ???
[Forms]![frmForm]![RecID]"
When I open a report and do this
strSQL = "SELECT * From qryMyQuery"
rs.open strSQL currentproject.connection
I get a parameter error.
It seems I cannot use the query as SQL for an rs.open ??
When I copied in the query SQL source and changed to
"WHERE ID =" & [Forms]![frmForm]![RecID].
it worked.
Is there any way I can use my query as is in the rs.open statement ???