Query: Total Attendance.

dynamite9585

Registered User.
Local time
Tomorrow, 01:58
Joined
Jul 4, 2010
Messages
34
I have a table made up that contains the fields.
[CDTID](number) [ParadeDate](Date/Time) and [OnParade](Yes/No)

i need to make a query that will find the CDTID and how many OnParade records return yes
would also like one to total all the OnParade results unconditionally so i can work out the average later.

thanks
 
I'm not sure what you want. Here's some possibilities. This one gives a count of true and a count of false.

SELECT OnParade, Count(OnParade) as OnParade_Count
FROM tbl_Attendance
GROUP BY OnParade

This one gives a count of all Trues/Yes

SELECT COUNT(OnParade)
FROM tbl_Attendance
WHERE OnParade = True

Pull a row by ID# (for example 234).

SELECT * FROM tbl_Attendance WHERE CDTID = 234
 
i finally got the query to give me the data i wanted.
i used Sum([Onparade]*-1) and got it to spit out as an expression.

now when i try to link that to my form i get #Name?
even using the expression builder i can't shake this error
 
on't know how you arived at Sum([Onparade]*-1) but in your query if you have a new column that was

Present:IIF([Onparade]=True,1,0)

Then summed the coloumn it would give you a better answer

If you group by Present and count present it will give you a total for each yes/no count
 
Present:IIF([Onparade]=True,1,0) gives me the same data as the one i used.
now i have thois data on the query i still can't get it on the form.
i need it to display on the form [Personal Info].
the query is [Attendancetracker Query]

current Control Source: =[Attandacetracker Query]![Paradecount]

i get the result to my textbox as #Name?
 

Users who are viewing this thread

Back
Top Bottom