C
CEV
SELECT tblEmployees.DateLeftAgency, tblExitSurvey.ReasonPay,
tblExitSurvey.ReasonEnvironment, tblExitSurvey.ReasonSupervisor,
tblExitSurvey.ReasonCoworkers, tblExitSurvey.ReasonEducation,
tblExitSurvey.ReasonTemp, tblExitSurvey.ReasonNewJob,
tblExitSurvey.ReasonPersonal, tblExitSurvey.ReasonRelocation,
tblExitSurvey.ReasonOther, tblExitSurvey.NewJobBenefits,
tblExitSurvey.NewJobPay, tblExitSurvey.NewJobOther,
tblExitSurvey.AgencyOrient, tblExitSurvey.JobOrient, tblExitSurvey.Training,
tblExitSurvey.DeptComm, tblExitSurvey.WorkHours, tblExitSurvey.PhysWorkCond,
tblExitSurvey.EnvWorkCond, tblExitSurvey.Supervisor,
tblExitSurvey.AgencyComm, tblExitSurvey.Salary, tblExitSurvey.PromoOppor,
tblExitSurvey.PandP
FROM tblEmployees INNER JOIN tblExitSurvey ON tblEmployees.EmployeeNumber =
tblExitSurvey.EmployeeNumber
GROUP BY tblEmployees.DateLeftAgency, tblExitSurvey.ReasonPay,
tblExitSurvey.ReasonEnvironment, tblExitSurvey.ReasonSupervisor,
tblExitSurvey.ReasonCoworkers, tblExitSurvey.ReasonEducation,
tblExitSurvey.ReasonTemp, tblExitSurvey.ReasonNewJob,
tblExitSurvey.ReasonPersonal, tblExitSurvey.ReasonRelocation,
tblExitSurvey.ReasonOther, tblExitSurvey.NewJobBenefits,
tblExitSurvey.NewJobPay, tblExitSurvey.NewJobOther,
tblExitSurvey.AgencyOrient, tblExitSurvey.JobOrient, tblExitSurvey.Training,
tblExitSurvey.DeptComm, tblExitSurvey.WorkHours, tblExitSurvey.PhysWorkCond,
tblExitSurvey.EnvWorkCond, tblExitSurvey.Supervisor,
tblExitSurvey.AgencyComm, tblExitSurvey.Salary, tblExitSurvey.PromoOppor,
tblExitSurvey.PandP
HAVING (((tblEmployees.DateLeftAgency) Between
[Forms]![frmReports]![txtBeginDate] And [Forms]![frmReports]![txtEndDate]));
This is the SQL view of the query I made so I can try to come up with the
report that I would like to get. This query of course does not do it. I am
not at all familiar with creating SQL queries. I have always created queries
in the design view.
The field's ReasonPay, ReasonEnvironment, ReasonSupervisor, ReasonCoworkers,
ReasonEducation, ReasonTemp, ReasonNewJob, ReasonPersonal, ReasonRelocation,
ReasonOther, NewJobBenefits, NewJobPay, NewJobOther are Yes/No checkboxes on
the form. I want the query to count how many records are checked Yes for
each field for the dates I specify. It would be great if I could also have
it calculate the percentage of records marked Yes for each of these fields.
The field's AgencyOrient, JobOrient, Training, DeptComm, WorkHours,
PhysWorkCond, EnvWorkCond, Supervisor, AgencyComm, Salary, PromoOppor, PandP
are fields that will contain a single number of either 1,2,3,4,or 5. What I
would like to do with these fields on the report is be able to display how
many are marked with either a 1 or 2, how many are marked with a 3, and how
many are marked with either a 4 or 5.
In the design view of the query I have tried both the Sum option and the
Count option in the Total row, but neither one does what I want it to. What
I am currently getting is a seperate page for each record that shows all the
checkboxes for each field or the number entered for the other fields. I'm
assuming that there must be something more complex I need to enter while in
the SQL view. If anyone can help me out with this, I would greatly
appreciate it!!
Thanks
Chad
tblExitSurvey.ReasonEnvironment, tblExitSurvey.ReasonSupervisor,
tblExitSurvey.ReasonCoworkers, tblExitSurvey.ReasonEducation,
tblExitSurvey.ReasonTemp, tblExitSurvey.ReasonNewJob,
tblExitSurvey.ReasonPersonal, tblExitSurvey.ReasonRelocation,
tblExitSurvey.ReasonOther, tblExitSurvey.NewJobBenefits,
tblExitSurvey.NewJobPay, tblExitSurvey.NewJobOther,
tblExitSurvey.AgencyOrient, tblExitSurvey.JobOrient, tblExitSurvey.Training,
tblExitSurvey.DeptComm, tblExitSurvey.WorkHours, tblExitSurvey.PhysWorkCond,
tblExitSurvey.EnvWorkCond, tblExitSurvey.Supervisor,
tblExitSurvey.AgencyComm, tblExitSurvey.Salary, tblExitSurvey.PromoOppor,
tblExitSurvey.PandP
FROM tblEmployees INNER JOIN tblExitSurvey ON tblEmployees.EmployeeNumber =
tblExitSurvey.EmployeeNumber
GROUP BY tblEmployees.DateLeftAgency, tblExitSurvey.ReasonPay,
tblExitSurvey.ReasonEnvironment, tblExitSurvey.ReasonSupervisor,
tblExitSurvey.ReasonCoworkers, tblExitSurvey.ReasonEducation,
tblExitSurvey.ReasonTemp, tblExitSurvey.ReasonNewJob,
tblExitSurvey.ReasonPersonal, tblExitSurvey.ReasonRelocation,
tblExitSurvey.ReasonOther, tblExitSurvey.NewJobBenefits,
tblExitSurvey.NewJobPay, tblExitSurvey.NewJobOther,
tblExitSurvey.AgencyOrient, tblExitSurvey.JobOrient, tblExitSurvey.Training,
tblExitSurvey.DeptComm, tblExitSurvey.WorkHours, tblExitSurvey.PhysWorkCond,
tblExitSurvey.EnvWorkCond, tblExitSurvey.Supervisor,
tblExitSurvey.AgencyComm, tblExitSurvey.Salary, tblExitSurvey.PromoOppor,
tblExitSurvey.PandP
HAVING (((tblEmployees.DateLeftAgency) Between
[Forms]![frmReports]![txtBeginDate] And [Forms]![frmReports]![txtEndDate]));
This is the SQL view of the query I made so I can try to come up with the
report that I would like to get. This query of course does not do it. I am
not at all familiar with creating SQL queries. I have always created queries
in the design view.
The field's ReasonPay, ReasonEnvironment, ReasonSupervisor, ReasonCoworkers,
ReasonEducation, ReasonTemp, ReasonNewJob, ReasonPersonal, ReasonRelocation,
ReasonOther, NewJobBenefits, NewJobPay, NewJobOther are Yes/No checkboxes on
the form. I want the query to count how many records are checked Yes for
each field for the dates I specify. It would be great if I could also have
it calculate the percentage of records marked Yes for each of these fields.
The field's AgencyOrient, JobOrient, Training, DeptComm, WorkHours,
PhysWorkCond, EnvWorkCond, Supervisor, AgencyComm, Salary, PromoOppor, PandP
are fields that will contain a single number of either 1,2,3,4,or 5. What I
would like to do with these fields on the report is be able to display how
many are marked with either a 1 or 2, how many are marked with a 3, and how
many are marked with either a 4 or 5.
In the design view of the query I have tried both the Sum option and the
Count option in the Total row, but neither one does what I want it to. What
I am currently getting is a seperate page for each record that shows all the
checkboxes for each field or the number entered for the other fields. I'm
assuming that there must be something more complex I need to enter while in
the SQL view. If anyone can help me out with this, I would greatly
appreciate it!!
Thanks
Chad