Combining queries into one report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have searched through the postings regarding my problem, but I can't seem to find what I am looking for. Currently I have a report based on one query that shows, for example:

employee name
employee number
course_taken
duration

An employee can take multiple courses, and I have summed the duration of all courses taken in the summary line. My problem is, that in the detail summary, I need to have a count of unique employee numbers so I can show how many employees have taken courses. I have created a secondary query that counts distinct employee numbers, but I don't understand how to bring that count into the report to show in the detail summary line, alonside the duration of total courses taken for example.

Please help!
 
Losanglr,

I am not sure what you mean by the "detail summary line". But one way
to do this is put an Employee Footer section on the report, put an
unbound textbox in there, Visible = No if you like, with its Control
Source set to =1 and set its Running Sum property to Over All. Let's
say you name this textbox EmployeeCounter. So then, in the Report
Footer, put another textbox, and set its Control Source to
=[EmployeeCounter]
 
Will this count only distinct employee numbers, or all of them? I need only distinct.
--
Thanking you WAY in advance :)


Steve Schapel said:
Losanglr,

I am not sure what you mean by the "detail summary line". But one way
to do this is put an Employee Footer section on the report, put an
unbound textbox in there, Visible = No if you like, with its Control
Source set to =1 and set its Running Sum property to Over All. Let's
say you name this textbox EmployeeCounter. So then, in the Report
Footer, put another textbox, and set its Control Source to
=[EmployeeCounter]

--
Steve Schapel, Microsoft Access MVP

I have searched through the postings regarding my problem, but I
can't seem to find what I am looking for. Currently I have a report
based on one query that shows, for example:

employee name employee number course_taken duration

An employee can take multiple courses, and I have summed the duration
of all courses taken in the summary line. My problem is, that in the
detail summary, I need to have a count of unique employee numbers so
I can show how many employees have taken courses. I have created a
secondary query that counts distinct employee numbers, but I don't
understand how to bring that count into the report to show in the
detail summary line, alonside the duration of total courses taken for
example.

Please help!
 
Pardon me.

Yes, it should count distinct employee numbers. Try it and if it doesn't work,
post back to the group.
Will this count only distinct employee numbers, or all of them? I need only distinct.
--
Thanking you WAY in advance :)

Steve Schapel said:
Losanglr,

I am not sure what you mean by the "detail summary line". But one way
to do this is put an Employee Footer section on the report, put an
unbound textbox in there, Visible = No if you like, with its Control
Source set to =1 and set its Running Sum property to Over All. Let's
say you name this textbox EmployeeCounter. So then, in the Report
Footer, put another textbox, and set its Control Source to
=[EmployeeCounter]

--
Steve Schapel, Microsoft Access MVP

I have searched through the postings regarding my problem, but I
can't seem to find what I am looking for. Currently I have a report
based on one query that shows, for example:

employee name employee number course_taken duration

An employee can take multiple courses, and I have summed the duration
of all courses taken in the summary line. My problem is, that in the
detail summary, I need to have a count of unique employee numbers so
I can show how many employees have taken courses. I have created a
secondary query that counts distinct employee numbers, but I don't
understand how to bring that count into the report to show in the
detail summary line, alonside the duration of total courses taken for
example.

Please help!
 
Back
Top