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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter Data to be put in a Report

Status
Not open for further replies.

hacht

MIS
Jun 8, 2001
25
US
I am not a Access Professional but I have been given the task of creating a DB to store and track Time utilization of Employees and Customers. Everything has gone as planned until I needed to create a report. My manager wants a report that will only show data for a single customer meeting a specified range of dates. I cannot think of a good way to do this, without creating seperate databases for each customer and clearing data out monthly. Is there any good solution?
 
Well, hopefully, you have a customer table with an id field and some date fields. I see a couple of tables at least:

tblEmployee
EmpID
Fname
Lname
...

tblCustomer
CustID
CustName
CustAddress
...

tblHours
EmpID
CustID
DayWorked
TotHours
...

After this, you could write your queries to find out which employees worked for a customer, number of hours for customer, etc.

SELECT tblCustomer.CustName, SUM(tblHours.TotHours)
FROM tblCustomer, tblHours
WHERE tblHours BETWEEN #01/01/01# AND #01/31/01#
GROUP BY tblCustomer.CustName

This query should get the total hours per customer for the month of January 2001.

Hope that helps... Terry M. Hoey
 
Strange, isn't it? There is never enough money to hire a programmer, but there is always enough money to pay an employee to learn to program. Which, in the long run, would you think is more economical?

Uncle Jack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top