G
Guest
I am trying to open a filtered recordset in the detail section of a report
I have this statement
rs.Open "select * from tbl_McareDX where Procedure = CPT", db,
adOpenDynamic, adLockOptimis
Procedure is a string variable set to the value of a field on the report
CPT is a field in the table I am opening
db is set as the connection
rs is set as the recordset
I am getting the following error
Arguments are of the wrong type, out of acceptable range, or in conflict
with each other
Can anybody help with this?
I have also tried putting the field value [Procedure Code] in place of the
procedure variable but I get the same error.
Also I am able to open the table if I remove the select statement and just
use the table name tbl_McareDX
I have this statement
rs.Open "select * from tbl_McareDX where Procedure = CPT", db,
adOpenDynamic, adLockOptimis
Procedure is a string variable set to the value of a field on the report
CPT is a field in the table I am opening
db is set as the connection
rs is set as the recordset
I am getting the following error
Arguments are of the wrong type, out of acceptable range, or in conflict
with each other
Can anybody help with this?
I have also tried putting the field value [Procedure Code] in place of the
procedure variable but I get the same error.
Also I am able to open the table if I remove the select statement and just
use the table name tbl_McareDX