Results 1 to 6 of 6
  1. #1
    nhoover is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    10

    Date range for pay periods


    Let me see If I can get this straight. For my time sheet access data base, I have multiple tables that are linked to one form titled work hours. Work hours is the form where all the employees will enter their time. In this form, I have an embedded drop down box that pulls up reports. This report displays all the hours entered into the work hours form. What I also have is an embedded filter favorites drop down box that has 'sick leave' and 'current weak'. This displays the report as such. What I'm having trouble with is a date range. Our pay periods start from the first (1st) of each month and end on the fifteenth (15th), and, the sixteenth (16th) to the end of the month (30th, 31st). Considering the options, how will I filter an inquiry based on these date ranges? I've tried multiple scenarios but I keep coming up wrong. Please help If you can. Thanks.

  2. #2
    nhoover is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    10
    This is what I have for date worked = this week. "(Year([Work Hours Extended].[DateWorked])=Year(Date()) AND DatePart(""ww"",[Work HoursExtended].[Date Worked],0)=DatePart(""ww"",Date(),0))" Now I need to figure out how to filter date worked = this pay period. Which will always be between the 1st and the 15th or 16th and the 31st. I've tried Between [start date] And [end date]...but its not right. Any tips beyond this would be really appreciated.

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    What are you trying to calculate? Total days worked minus weekends?

    So let's say the month starts on a monday, from the 1st to the 15th there are a total of 11 working days (1st - 5th, 8th - 12th and the 15th)?

  4. #4
    nhoover is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    10
    Satsop TimeSheet.zip Hopefully you can get a better picture of what I'm trying to do. You'll see that I have a form titled Nate Hoover. If you open this form you'll notice work hours entered based on the work codes. If you look in the heading you'll see a drop down box for reports, time sheet is the only one I'm using for now. You'll also see the filter drop down box in the upper right hand corner. This is the operation I'm trying to solve. I created a query called pay period. This I want to reflect in the filter table. I'm new to access so I'm not sure how to make it all work. I'm close, I just can't get it to operate with out a proper 'filter string'. I think the query pay period is correct and shows the date ranges I'd like to see when entered, I just do not have the knowledge to enter that into the filter string. You get me? This is pretty foreign to me so please bare with me.

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    Ug, embedded macros. I really do not use macros ever, I find them very cumbersome and limiting.

    The answer to your FILTER STRING in your FILTERS table is:

    ([Date Worked] between [Start Date] and [End Date])

    where the syntax [START DATE] and [END DATE] match the syntax in your query PAY PERIOD

  6. #6
    nhoover is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    10
    Much obliged. Appreciate the quick response.

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

Similar Threads

  1. Replies: 1
    Last Post: 03-06-2013, 10:30 AM
  2. Date Range
    By radhujs in forum Queries
    Replies: 2
    Last Post: 01-07-2013, 02:52 PM
  3. Replies: 3
    Last Post: 07-18-2012, 10:13 PM
  4. Date Range Report with Multiple Date Fields
    By StevenCV in forum Reports
    Replies: 13
    Last Post: 02-29-2012, 08:29 AM
  5. Date range
    By eacollie in forum Queries
    Replies: 7
    Last Post: 06-05-2011, 03:38 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