B
Bob
running access 2k;
I'm working on a sub-report with 4 columns. I want to determine the
total # of columns (up to 4) by doing a recordset count using Dcount.
My purpose in doing this is to be able to turn the ForeColor to red on
ONLY the last column. (not all records in the master report will have
4 columns)
here's the Dcount statement I'm using:
y = DCount("[complaint_no]", RecordSource)
here's the problem:
my sub report is using query "myquery" as the recordsource.
IF "myquery" doesn't have any criteria in any fields, the Dcount
function works.
BUT - if "myquery" has a field [ssn] which has "[emp][.ssn]" as the
criteria; I get the following error msg: RT err 2471 "expression
entered as query parameter gave this error: the object doesn't contain
the automation object 'emp.ssn' "
emp.ssn is in my master report, and the query works fine if I'm not
trying to figure out the Dcount.
I have my query setup this way because when I tried linking the
reports master & child fields to ssn; I was not getting the desired
results. (which is a sub-report with only the complaints associated
with each employee being used in master)
I know that Dcount has its own criteria capability (which I have not
tried using because I didn't want dcount to run ANOTHER query on top
of the 1 just run). But if my query itself already takes care of the
criteria - why isn't Dcount happy???
tia - Bob
I'm working on a sub-report with 4 columns. I want to determine the
total # of columns (up to 4) by doing a recordset count using Dcount.
My purpose in doing this is to be able to turn the ForeColor to red on
ONLY the last column. (not all records in the master report will have
4 columns)
here's the Dcount statement I'm using:
y = DCount("[complaint_no]", RecordSource)
here's the problem:
my sub report is using query "myquery" as the recordsource.
IF "myquery" doesn't have any criteria in any fields, the Dcount
function works.
BUT - if "myquery" has a field [ssn] which has "[emp][.ssn]" as the
criteria; I get the following error msg: RT err 2471 "expression
entered as query parameter gave this error: the object doesn't contain
the automation object 'emp.ssn' "
emp.ssn is in my master report, and the query works fine if I'm not
trying to figure out the Dcount.
I have my query setup this way because when I tried linking the
reports master & child fields to ssn; I was not getting the desired
results. (which is a sub-report with only the complaints associated
with each employee being used in master)
I know that Dcount has its own criteria capability (which I have not
tried using because I didn't want dcount to run ANOTHER query on top
of the 1 just run). But if my query itself already takes care of the
criteria - why isn't Dcount happy???
tia - Bob