Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2012
    Posts
    11

    Question Unanswered: Grouping in Report question

    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.

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    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

    Code:
    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
       Else
       WEEKEND = dat
       End If
    End Function
    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. Reason: spelling
    hope this help

    See clear as mud


    StePhan McKillen
    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.

  3. #3
    Join Date
    Oct 2012
    Posts
    11
    Interesting idea. Not sure if it is quite what I'm looking for, but I'll see what I can do to make it work. Thanks for the suggestion.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •