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

Code and format to display grid format

Status
Not open for further replies.

JOD59

Technical User
Dec 17, 2003
39
US
I'm not sure if this can be done, but here it goes. I would like to display a week of attendance information in a report format that displays it like a spreadsheet. This will be a new database so I can construct it however I need to. I’m not sure how I would write the code to pull the information in the day format sorted by the week and how to set up the report to show the employee names in a column? Confused? I am, Thanks for any help

WeekNum 1
------------
Emp Mon Tues Wed Thur Fri Sat Sun
----------------------------------------------------
Emp1 Sick Vac OT
Emp2 Vac Vac Vac OT OT
Emp3 Sick Sick Sick Sick Sick

 
Whatever you don't make sure you store your data in normalized tables. I would expect tables like:
[blue]
Code:
tblEmployees
===================
EmployeeID
EmpFirstName
EmpLastName
....

tblPayCodes
===================
PayCodeID
PayTitle  (values like Sick, Vac, ...)

tblAttendance
==================
AttendID
EmployeeID
PayCodeID
AttendDate

To get your report, you would create a crosstab based on the above tables. Set the row heading to both the employee fields and the DatePart("ww",[AttendDate]). Set the Column headings to Format([AttendDate],"ddd").

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top