Results 1 to 6 of 6
  1. #1
    murphybodie is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Oct 2016
    Posts
    3

    How do you set up multiple information for one field name like multiple rates of pay over time

    I am new to data bases and have listened to numerous access tutorials. I can not figure out how to have a field called pay rate where you would enter a current pay rate but in 6 mos. the person gets a raise but where can I show the new rate without altering the beginning pay rate or without adding a new column . And, that would also apply to the date. Any help would be appreciated. Thank you.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    where can I show the new rate without altering the beginning pay rate or without adding a new column
    in a different table - something like

    your existing table
    tblEmployees
    EmployeePK autonumber
    EmployeeName text
    .....
    .....

    the pay rates table

    tblPayRates

    PayRatePK autonumber
    EmployeeFK long
    PayRate currency
    PayFrom date

    your payrates would be in a subform on your employees form

    you can use a relatively simple query to get the rate applicable on any given day

  3. #3
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    Adding to what Ajax offered, I would add PayTo (expiry date for the row) to make it easier to get the current PayRate or find a PayRate in time:

    Current PayRate:
    SELECT PayRate FROM tblPayRates WHERE PayTo Is Null Or Date() Between PayFrom And PayTo

    The first WHERE part would return the current PayRate that doesn't have an expired (PayTo) date.

    imo, I'd use DateStart and DateEnd instead for the field names.

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    don't see why you need a date to - for the current rate

    SELECT TOP 1 PayRate FROM tblPayRates WHERE EmployeeFK=[Enter employeePK] and PayFrom<=Date() ORDER BY PayFrom Desc

    If you want rate for a specific date then change Date() to [Enter Date]

  5. #5
    murphybodie is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Oct 2016
    Posts
    3
    The reason I mentioned a date for current rate was meant to say that the date hired and at what rate was fine. My problem came in when a person gets a rate increase and the date of the increase. I didn't know how to show the new rate and date of increase.

  6. #6
    murphybodie is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Oct 2016
    Posts
    3
    Thank you. I will try that.

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

Similar Threads

  1. Form Information from multiple tables.
    By Homegrownandy in forum Access
    Replies: 1
    Last Post: 08-27-2015, 05:20 AM
  2. Replies: 8
    Last Post: 06-24-2015, 08:22 AM
  3. Replies: 6
    Last Post: 03-11-2015, 08:39 AM
  4. populating field with USPS postage rates
    By gringotani in forum Programming
    Replies: 1
    Last Post: 07-09-2013, 12:22 PM
  5. Replies: 1
    Last Post: 12-10-2009, 08:41 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