Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report based on multiple Query

Status
Not open for further replies.

hobman

Vendor
Sep 8, 2004
39
US
I have a database with Business Clients and Individual Clients. I also have transaction records for each type of clients. Employees work on both types of clients. I would like to have a report that shows all the work done by each employee. The report needs to include the work done for Busines Clients, and the work done for individual clients. Each transaction table has

1. Date of transaction (BDate)
2. Employee Name
3. Duration

I would like to have one report display all the transaction and the running sum of the duration as a total. I would like the report to look as follows.

EmployeeName BDate Duration IDate Duration
bob
2/1/05 1:30min 2/2/05 2:15min


"Footer" Total Duration: 3:45min

I would appreciate any help.
 
How about you try again? "Each transaction table has" doesn't make any sense. Please describe your tables and fields, show us some sample records, and how you would like to see these displayed in a report.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Sorry for not being clear. here is what I have:

I have transactions tables called tblBusinesWork, tblIndividualWork help. They each have fields such as

tblBusinessWork
BEmp_Name
BDate
BStart_Time
BEnd_Time

tblIndividualWork
IEmp_Name
IDate
IStart_Time
IEnd-Time

I have two queries that display the above info.

I would like to find a way to display the combination of the two quiries on one report so I can calculate the total amount of time an employee spent working as a total (busines, individual)

I hope this is a bit more clear.

hobman
 
Create a union query:
Code:
SELECT "B" as BusInd, BEmp_Name as EmpName, BDate as WorkDate, bStart_Time as StartTime, BEnd_Time as EndTime
FROM tblBusinessWork
UNION ALL
SELECT "I", IEmp_Name, IDate, IStart_Time, IEnd_Time
FROM tblIndividualWork;

I think I would have used only one table so the union query would not have been necessary.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top