Results 1 to 8 of 8
  1. #1
    bigmac is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2008
    Posts
    21

    Question tables and dates

    hi all, can you help please? i am making a table and cells "start date" and another called " retest date " what i am trying to do is after the user input the date into "start date" then "retest date" will auto fill with start date plus 2 years , any ideas please?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    When you talk of " tables and cells", you are thinking more in terms of spreadsheet than Database.
    Here is a link to some Access and database info that will be helpful.
    http://www.accessmvp.com/strive4peace/

    Good luck with your project.

  3. #3
    bigmac is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2008
    Posts
    21
    sorry but i mean that these are fields and the names of the fields aere as follows " start date " and "retest date" i want "re test date" to to add 2 years to the start date and display result in "re test date" field

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    When you have a "normalized" table, and you want a value that can be calculated at any time, you do NOT need to store the calculated value.

    You should avoid using spaces and special characters in your field and object names.

  5. #5
    bigmac is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2008
    Posts
    21
    sorry orange i do not understand you all i want is for the table to show two fields "start date " and retest date" so that after putting in the start date then the " retest" field will show the date of retesting which is 2years after start date

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    You would not put that in a Table.
    You could have a query identifying Retest dates.

    SELECT Employee.EmpId, Employee.StartDate, DateSerial(Year([StartDate])+2,Month([startDate]),Day([StartDate])) AS RetestDate
    FROM Employee;

    EmpId StartDate RetestDate
    1 27/03/1999 27/03/2001
    2 03/03/2000 03/03/2002
    3 04/04/2008 04/04/2010
    4 05/05/2009 05/05/2011
    5 12/03/2007 12/03/2009
    6 02/04/2004 02/04/2006
    7 03/03/2006 03/03/2008

  7. #7
    bigmac is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2008
    Posts
    21
    thanks for your help orange , will use your last option

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

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

Similar Threads

  1. Query input dates for range of dates in two fields
    By kagoodwin13 in forum Queries
    Replies: 3
    Last Post: 02-13-2012, 04:25 PM
  2. Query two tables for specified dates
    By funkygoorilla in forum Queries
    Replies: 2
    Last Post: 12-12-2011, 11:12 AM
  3. Replies: 10
    Last Post: 11-16-2011, 10:58 AM
  4. display all dates between two dates
    By KenThompson in forum Access
    Replies: 8
    Last Post: 02-23-2011, 01:11 PM
  5. Mixed dates - show only complete dates?
    By weeblesue in forum Queries
    Replies: 3
    Last Post: 10-27-2010, 02:15 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