+ Reply to Thread
Results 1 to 2 of 2

Thread: How To Identify Current Data vs. Prior Week Data

  1. #1
    Forum Contributor
    Join Date
    02-25-2008
    Location
    Windsor, ON Canada
    Posts
    104

    How To Identify Current Data vs. Prior Week Data

    Hi,

    I hope I can word this question so that it's fairly simple.

    I'm trying to build a model which distributes our payroll.

    In my Access tables, I would like to have many week's worth of data. The data will have a column identifying it to a particular week ("Wk 36", "Wk 37", etc.).

    I need to build a formula which says "If this situation occurs, use the present week's data. But if not, use the prior week's."

    The goal is to have all my input tables in Excel and the model in Access, with an exported journal entry coming back into Excel. Access would never need to be opened by the accounting clerk posting payroll.

    Any ideas how to make this weekly distinction in Access so that I can build it into formulas?

  2. #2
    Forum Guru davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2007
    Posts
    1,879

    Re: How To Identify Current Data vs. Prior Week Data

    I certainly would not use a text field to keep track of the week. Either go with an integer field or a date field, depending on how you wish to do your calculations. I'd say it'd be easiest to use an integer field, as long as you have a way of clearly identifying what week you need in your calculations. Getting data out of the table would be as easy as:
    SELECT * FROM payrolltable WHERE weeknumber = 37.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0