Ally
Registered User.
- Local time
- Today, 16:26
- Joined
- Sep 18, 2001
- Messages
- 617
This should be so simple, but it’s completely baffled me.
On my report I have a list of Staff, Courses etc and whether they Attended, Cancelled or DNAd (Did Not Attend) –fieldname = “AttendanceID”. At the end of each section, I’d like to breakdown the number of Attended (1), Cancelled (2) and DNAd (3).
Eg:
Name- - - - - - - - - - Course - - - - - - - - -Attendance Details
Fred Flintstone- - - -MS Word Beg- - - - - Attended
Barney Rubble- - - - MS Word Adv- - - - -DNA
Joe Bloggs- - - - - - -MS Access- - - - - - -Attended
Posh Spice- - - - - - MS Excel - - - - - - - -Cancelled
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -Attended: 2
- - - - - - - - - - - - - - - - - - - - - - Cancelled: 1
- - - - - - - - - - - - - - - - - - - - - - - - - - DNA: 1
To obtain Attended I tried the following in a text box:
=DCount("[attendanceid]","qryMonthlyStaff","[attendanceid]=1")
But it doesn’t work – just gives #Error. I’ve tried all sorts of variations of this and normal Count. Tried it in VBA behind the report with a Label.Caption. This produced:
Also tried a loop in a function but that came up with parameter errors too. There are date parameters behind the query which feeds the report.
I would have thought the Dcount should have done it.
[This message has been edited by Ally (edited 05-22-2002).]
On my report I have a list of Staff, Courses etc and whether they Attended, Cancelled or DNAd (Did Not Attend) –fieldname = “AttendanceID”. At the end of each section, I’d like to breakdown the number of Attended (1), Cancelled (2) and DNAd (3).
Eg:
Name- - - - - - - - - - Course - - - - - - - - -Attendance Details
Fred Flintstone- - - -MS Word Beg- - - - - Attended
Barney Rubble- - - - MS Word Adv- - - - -DNA
Joe Bloggs- - - - - - -MS Access- - - - - - -Attended
Posh Spice- - - - - - MS Excel - - - - - - - -Cancelled
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -Attended: 2
- - - - - - - - - - - - - - - - - - - - - - Cancelled: 1
- - - - - - - - - - - - - - - - - - - - - - - - - - DNA: 1
To obtain Attended I tried the following in a text box:
=DCount("[attendanceid]","qryMonthlyStaff","[attendanceid]=1")
But it doesn’t work – just gives #Error. I’ve tried all sorts of variations of this and normal Count. Tried it in VBA behind the report with a Label.Caption. This produced:
Run-time error ‘64479’.
The expression you entered as a query parameter produced this error: “The object doesn’t contain the Automation object “Enter Start Month yy/mm.”
Also tried a loop in a function but that came up with parameter errors too. There are date parameters behind the query which feeds the report.
I would have thought the Dcount should have done it.
[This message has been edited by Ally (edited 05-22-2002).]