Results 1 to 5 of 5
  1. #1
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164

    Numerical Value based on Date

    I am in need of some help with this one. I currently have a database that trackes employee contributions and payments to/from their Flex account.
    The contribution shows as an anual amount.

    My report showing employee balances is built off of a query that takes the annual amount and devides it by 26 to show thier contribution per pay period. (Bi-weekly)

    currently I have to manually enter the week number (ie. "4" since we are in week 4) into the column that represents the current payroll week.

    I am sure there has to be a way to write an expression that will calulate this value for me so that I do not have to change it every payroll period.



    Can someone please offer some suggestions on how I can acccoplish this.

  2. #2
    ConneXionLost's Avatar
    ConneXionLost is offline Simulacrum
    Windows XP Access 2003
    Join Date
    Jan 2010
    Location
    Victoria, Canada
    Posts
    291
    There are ways to calculate a current week number, here's one example.

    The tricky part will be whether this (Microsoft's) approach to numbering weeks is the same method you use in your company.

    Week Numbering is one of the most contentious topics in use when referring to dates.

    Cheers,

  3. #3
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    Thanks ConneX,

    That appears to be what I am looking for. Let me give that a try.

  4. #4
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    ok, I am currently using the expression:

    Payroll Week: Format(Now(),"ww")-1

    This is giving me week 10 which is correct but I need to devide that by 2 so that I can represent the payroll week. I can not seem to find out how to add that last factor to the expression. How can I take what I have shown above and devide the result by 2?

  5. #5
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    ok, I figured it out. The formulat now shows as seen:

    Payroll Week: (Format(Now(),"ww")-1)/2

    this is giving me teh result of 5 which is what I needed. Thanks a bunch ConneX

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

Similar Threads

  1. Making New Record Number Next Numerical Number
    By jhillbrown in forum Access
    Replies: 1
    Last Post: 03-10-2010, 11:06 AM
  2. Replies: 3
    Last Post: 09-29-2009, 07:08 AM
  3. Replies: 0
    Last Post: 07-27-2009, 07:51 AM
  4. Count numerical and alphabetic fields
    By nukethrower in forum Queries
    Replies: 0
    Last Post: 02-26-2008, 10:51 PM
  5. Auto-increment for non-100% numerical fields
    By supernoob in forum Access
    Replies: 0
    Last Post: 05-03-2007, 09:44 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