dcsimg
Results 1 to 4 of 4

Thread: [RESOLVED] Need help calculating a date in the future based on days in another table

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2018
    Posts
    7

    Resolved [RESOLVED] Need help calculating a date in the future based on days in another table

    Hello all,

    I am trying to calculate a date based on a date entered in a form in Access. The date is in the future and is based on the number of days contained in another table. The other table contains fields "Early" & "Late" which will both be needed. The table that contains the Early & Late number of days is called tblSpecies.

    VBA and SL are not my strong points by any means. I have tried DLookup which I believe will work but I cannot figure out how to specify the row of data I need so it just gets the dates for the first row which isn't correct, I need to get it for the Species ID but I cannot figure out how it should appear in the DLookUp statement.

    Any Help would be greatly appreciated.

    Thanks

    Dave

  2. #2

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2018
    Posts
    7

    Re: Need help calculating a date in the future based on days in another table

    I have made some headway on this but Still having an issue. I believe I have found the correct syntax, etc., but I am still getting the incorrect # of days. I am still getting the number of days for the 1 row of data in the table when I should be getting the number of days for the 4th row of data.

    Me.EarlyDate = DLookup("Early", "tblSpecies", Forms!frmAnimalDataEntry!Species)

    This is getting the data and if I look at "Forms!frmAnimalDataEntry!Species" when hovering the mouse over it it say the value is 4 which is correct, and the # of days for line 4 is 58, but when I hover the mouse over "Me.EarlyDate" that says 330 is the number of days which is from the 1st row of data in the table and is incorrect.

    Thanks

    Dave

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2018
    Posts
    7

    Re: Need help calculating a date in the future based on days in another table

    I have it figured out

    Thanks for looking.

    Dave

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width