I'm sure there is a very simple solution to this that I'm missing.
Summary of situation: I've built a report in Access 2010 to summarize a per-diem employee's hours and pay on a weekly basis. I currently have the data grouped first by employee name then by date on a weekly basis. The report can be created based on a date range entered by another form. Since payroll is done on a bi-weekly basis, the report gets generated with a summary of the first week's data on one line, then the second week's data on a second line, per each employee. Right now on the report, if more than one week is selected, the first line shows the employee's name, then the summary of the hours worked and pay accumulated for that week, while the second line just shows the summary of the second week's hours and pay, which is how it's supposed to be grouped, but the employee name is not repeated.
Question: In the report, is it possible to put in a label or text box that will detail the individual weeks, such as "Week 1", "Week 2", or even the date range of each week?
This is more a cosmetic request than anything else. The calculations and everything else with the report is functioning fine, thankfully. Any advice would be most appreciated. Thanks and Happy New Year.
your post got me thinking how to Format a Label and show the "Week 1", "Week 2" even for me Been doing this 10years i'm have a mine Blank (brain fart)
I will think about this and see..
only thing that come to my mine is datediff("ww",date1,date2) this should the number of weeks between the 2 dates
but the problem is if you only want to show week 1 them week 2 telling the computer Which is week 1 and which is week 2
But What I do is group my reports by a weekending dates saturday
Public Function WEEKEND(dat) As Date
If IsNull(dat) Then Exit Function
dat = DateSerial(Year(dat), Month(dat), Day(dat))
If dat Mod 7 > 0 Then
WEEKEND = dat - dat Mod 7 + 7
WEEKEND = dat
by change the function you could get it to return a monday date
-5 would give you a monday date just rem the ()
put above code into module
then in the query call by WEEKEND:WeekEnd(feilddateindatabase)
it will return the saturday date of ANYdate you give it
hope this point you down the right track
Last edited by myle; 12-30-12 at 06:30.
hope this help
See clear as mud
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Progaming environment: Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010 VB based on my own environment: vb6 sp5 ASP based on my own environment: 5.6 VB-NET based on my own environment started 2007 SQL-2005 based on my own environment started 2008 MYLE YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.