G
gjtired
I have an access 2003 database with a SQL Server backend. I’m trying
to run a query to get a record count. It will either return 1 row or
0. I need to know which it is.
Here is the query:
SELECT Count(tblCSP_Participant.RegID) AS CountOfRegID
FROM tblCSP_Participant
WHERE (((tblCSP_Participant.RegID)= "" & [Forms]![frmRegistrationSel]!
[sbfrmRegistrationSelSub]!RegID & “”) AND
((tblCSP_Participant.Edit_Date)=(select Max(Edit_Date)
from tblCSP_Participant AS b
where b.RegID = tblCSP_Participant.RegID)));
When I get to this line:
Set rs = qd.OpenRecordset()
I get the error:” too few parameters: Expected 1”
If I hard code the RegID in the query instead of [Forms]!
[frmRegistrationSel]![sbfrmRegistrationSelSub]! I don’t get that
error.
Can someone please help.
Thanks
to run a query to get a record count. It will either return 1 row or
0. I need to know which it is.
Here is the query:
SELECT Count(tblCSP_Participant.RegID) AS CountOfRegID
FROM tblCSP_Participant
WHERE (((tblCSP_Participant.RegID)= "" & [Forms]![frmRegistrationSel]!
[sbfrmRegistrationSelSub]!RegID & “”) AND
((tblCSP_Participant.Edit_Date)=(select Max(Edit_Date)
from tblCSP_Participant AS b
where b.RegID = tblCSP_Participant.RegID)));
When I get to this line:
Set rs = qd.OpenRecordset()
I get the error:” too few parameters: Expected 1”
If I hard code the RegID in the query instead of [Forms]!
[frmRegistrationSel]![sbfrmRegistrationSelSub]! I don’t get that
error.
Can someone please help.
Thanks