Results 1 to 5 of 5
  1. #1
    Molly is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    2

    Date Problems

    I have a field called treatment date and a field called WHP Days. I would like to add the number in WHP Days to the date and show result in another field called WHP Safe Date. Can someone help?

    Molly

  2. #2
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,165
    Youll want to create a query, you'll simply create a calculated field [treatment date]+[whp days]. You'll be tempting to create this calculated field in the table, don't do it. Use a query.

  3. #3
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    And you should NEVER have spaces in object names.

    Example: A better name for "treatment date" would be "TreatmentDate" or "treatment_date".

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Youll want to create a query, you'll simply create a calculated field [treatment date]+[whp days]. You'll be tempting to create this calculated field in the table, don't do it. Use a query.
    This is excellent advice.

    Unless these underlying values are changing, and you are trying to capture and store the value as of a specific point in time for historical purposes, the general rule of thumb is "never store any calculation which can be done on-the-fly pretty easily". Doing so ruins the dynamic nature of the database, and can undermine data integrity.

  5. #5
    Molly is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    2
    Thankyou I have created a query, and all works
    Molly

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

Similar Threads

  1. Problems with Date Range Parameters in query
    By ethornto2346 in forum Queries
    Replies: 3
    Last Post: 06-23-2015, 10:06 AM
  2. Replies: 3
    Last Post: 12-06-2014, 03:59 AM
  3. Problems with date range in query
    By pbaccess in forum Access
    Replies: 1
    Last Post: 02-18-2014, 04:54 AM
  4. Replies: 11
    Last Post: 03-21-2012, 12:51 PM
  5. Date Query Problems
    By 97rstd in forum Queries
    Replies: 1
    Last Post: 12-09-2011, 11:34 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