Results 1 to 4 of 4
  1. #1
    teamde78 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    2

    Creating payroll database

    Hello there,

    I am trying to create a payroll database that will display total payroll by department for the most recent pay week.

    My question is.... How do I sort the data once I have summed the total per department for week.

    I currently have it set so that it will show all weeks, but what can I do to further filter the results to include just one week, or the most recent.

    Click image for larger version. 

Name:	datasheet.jpg 
Views:	16 
Size:	37.0 KB 
ID:	20478

    You can see I have all the data, I just need to create a query that will only show the most recent.

    I tried using MAX and LAST for the date field, and it was still adding all of the pay.

    Click image for larger version. 

Name:	designview.jpg 
Views:	16 
Size:	40.1 KB 
ID:	20479



    If anyone could help me I would appreciate it.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    For the 'one week', one way is to calculate a week identifier for each record and apply filter criteria to that constructed field. Another is to use begin and end week dates as parameters.

    One possibility for the 'most recent': http://allenbrowne.com/subquery-01.html#TopN
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870

  4. #4
    teamde78 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    2
    Its not a real application. It is for a class. Employee information is held in a separate table

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Payroll System
    By princess12 in forum Access
    Replies: 5
    Last Post: 04-02-2015, 05:22 PM
  2. Help with payroll form
    By visidro in forum Access
    Replies: 7
    Last Post: 10-22-2014, 04:49 PM
  3. Help with Designing Payroll Database
    By bgwool in forum Access
    Replies: 1
    Last Post: 04-04-2014, 03:53 PM
  4. Payroll calculations
    By Rogue in forum Programming
    Replies: 5
    Last Post: 07-10-2013, 10:34 PM
  5. Problem with Module for Payroll
    By burrina in forum Modules
    Replies: 5
    Last Post: 10-22-2012, 04:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums