Hello Guru's of Access....
I need your help on quarries....
I have create few option buttons in a form and assigned values. when each option button selected it will store a value in tbl.attend.log
Exp - Opt 1 button = 1 = OnDuty
Opt 2 Button = 2 = DutyTravel
Opt 3 Button = 3 = SeekLeave
tbl.attend.log
ST_Name ST_Date ST_Attend
Tom 01/04/2014 1
Jim 01/04/2014 1
Harry 01/04/2014 1
Tom 02/04/2014 1
Jim 02/04/2014 2
Harry 02/04/2014 1
Tom 03/04/2014 3
Jim 03/04/2014 1
Harry 03/04/2014 2
i would like to display above data as below when i run a quarry Group By ST_Name , Between dates, Count ST_Attend
ST_Name OnDuty DutyTravel SeekLeave
Tom 2 0 1
Jim 2 1 0
Harry 2 1 0
I manage do a quarry as below
SELECT tbl_attend_log.ST_Name, Count(tbl_attend_log.ST_Attend) AS OnDuty,
FROM tbl_attend_log
WHERE (((tbl_attend_log.ST_Date) Between [Forms]![frm_StaffAttend_form]![Text19] And [Forms]![frm_StaffAttend_form]![Text20]) AND ((tbl_attend_log.ST_Attend) Like '1'))
GROUP BY tbl_attend_log.ST_Name;
Output was
ST_Name OnDuty
Tom 2
Jim 2
Harry 2
Can any one help me .............
I need your help on quarries....
I have create few option buttons in a form and assigned values. when each option button selected it will store a value in tbl.attend.log
Exp - Opt 1 button = 1 = OnDuty
Opt 2 Button = 2 = DutyTravel
Opt 3 Button = 3 = SeekLeave
tbl.attend.log
ST_Name ST_Date ST_Attend
Tom 01/04/2014 1
Jim 01/04/2014 1
Harry 01/04/2014 1
Tom 02/04/2014 1
Jim 02/04/2014 2
Harry 02/04/2014 1
Tom 03/04/2014 3
Jim 03/04/2014 1
Harry 03/04/2014 2
i would like to display above data as below when i run a quarry Group By ST_Name , Between dates, Count ST_Attend
ST_Name OnDuty DutyTravel SeekLeave
Tom 2 0 1
Jim 2 1 0
Harry 2 1 0
I manage do a quarry as below
SELECT tbl_attend_log.ST_Name, Count(tbl_attend_log.ST_Attend) AS OnDuty,
FROM tbl_attend_log
WHERE (((tbl_attend_log.ST_Date) Between [Forms]![frm_StaffAttend_form]![Text19] And [Forms]![frm_StaffAttend_form]![Text20]) AND ((tbl_attend_log.ST_Attend) Like '1'))
GROUP BY tbl_attend_log.ST_Name;
Output was
ST_Name OnDuty
Tom 2
Jim 2
Harry 2
Can any one help me .............