Results 1 to 4 of 4
  1. #1
    Hog80ci is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Location
    Phoenix, AZ
    Posts
    2

    Newbie with two questions involving automatic updating of dates

    I work in a residential drug treatment program and am in the process of building a database to track various info on our patients. My questions are:

    1. We often have a wait list of people waiting to get into the program. I have a field AddedToWaitlist and another TimeonWaitlist. I want TimeonWaitlist to automatically update each day a patient remains on the list.



    2. This is a 92 day program. I have a DateofAdmission field and a DateofGraduation field. I want the DateofGraduation to automatically add 91 days to the DateofAdmission and show the date.

    Is any of this even possible?

    Thank you very much in advance for your help.

    James

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Possible? Sure, but:

    1) In a word, don't. There's a general rule-of-thumb in database design that you don't store calculated values. It's simple to calculate the time on the wait list from the added to date with the DateDiff() function and the Date() function which returns today's date. You can even use the admission date or the current date when there is no admission date (they're still waiting) with the Nz() function.

    2) Similarly, if it's always 92 days, there's no need to store the date. You can calculate it with DateAdd() from the admission date.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Hog80ci is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Location
    Phoenix, AZ
    Posts
    2
    Quote Originally Posted by pbaldy View Post
    Possible? Sure, but:

    1) In a word, don't. There's a general rule-of-thumb in database design that you don't store calculated values. It's simple to calculate the time on the wait list from the added to date with the DateDiff() function and the Date() function which returns today's date. You can even use the admission date or the current date when there is no admission date (they're still waiting) with the Nz() function.

    2) Similarly, if it's always 92 days, there's no need to store the date. You can calculate it with DateAdd() from the admission date.
    Thanks very much. I will try that. Obviously shows I'm struggling a bit here.

    James

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    No problem, and welcome to the site! Post back if you get stuck.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Newbie w/a few questions
    By Davo in forum Access
    Replies: 3
    Last Post: 11-14-2011, 01:13 PM
  2. Problems with automatic updating
    By teresamichele in forum Access
    Replies: 2
    Last Post: 01-12-2011, 02:39 PM
  3. Couple of newbie questions
    By Awowk in forum Access
    Replies: 12
    Last Post: 08-06-2010, 01:16 PM
  4. Basic questions from a newbie! :(
    By Michael_ in forum Access
    Replies: 6
    Last Post: 05-07-2010, 02:41 PM
  5. newbie questions
    By bigmac in forum Access
    Replies: 0
    Last Post: 10-07-2008, 12:53 AM

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