Results 1 to 7 of 7
  1. #1
    djclinton15 is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Nov 2015
    Posts
    123

    Exclamation Will dates be updated if query is made into a table

    Hi. I generated a list of over 1,200 birthdates, I.E. 4/9/2019 & put them into a database Table. From this table, I created a query containing the age & birthyear criteria. I’m not a person who likes to assume, however, I assume that the birth years as well as the ages increases as the calendar years changes. Let me give an example. The current year is 2019, the birthdate is 5/231992, which would make the year 1992, & the age would be 27. Therefore, (I assume) come next year, 2020 Access will automatically change the birth year to 1993, & the age will change from 27 to 28. Let’s supposed I’m right for a moment. My actual question is, if I wanted to make this query into a Table then the birth year & the age would not change every new year. At first, I was ready & wanted to make this query into a Table, but I stopped myself realizing how probably the birth years & ages will not increase every new year. I think I’m right, just looking for reassurance.

    Any advice/suggestions would be greatly appreciated! Thanks in advance!

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    First of all the age of someone born on 5/23/1992 is currently 26 not 27.
    Secondly, Access will certainly not change their date of birth next year.

    If the age is calculated in a query that value will always be up to date.
    However if you save the age to a table, the age will not change as it is saved data.
    It is for that precise reason that saving calculated values is normally a bad idea.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,523
    you keep the birthdate in a table field, then
    use a query to calc the age.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Data will not change unless you run an UPDATE query.

    Why would you want to make a table?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    It depends.

    Any hard-coded data will NOT change.
    If these fields are calculated fields in a query (or table), and the dynamic current date function is used in the calculation, those values will change (as the calculations are automatically re-calculated every time you view the query).
    However, if youw write the results of the query to a table (i.e. a Make Table Query or Append Query), those calculations turn into hard-coded values and will not change.

    Does that answer your question?
    If you are still not sure, post these calculated fields so we can see how you have written them.

  6. #6
    djclinton15 is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Nov 2015
    Posts
    123
    First, I wish to thank & share my appreciation to all who replied to my post! Second, after reading the first reply I realized what a stupid question I had & saw myself as nothing more than a fool. Even as an amateur at Access (as I always see myself as) ought to have realized making a query with calculated fields into a table would cancel out the calculated fields.

  7. #7
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Don't beat yourself up over it!
    I have always been of the opinion that it is better to ask what may appear to be a "foolish question" than it is to make a "foolish mistake"!

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

Similar Threads

  1. Replies: 6
    Last Post: 04-07-2015, 03:41 PM
  2. Replies: 2
    Last Post: 04-07-2015, 10:36 AM
  3. Replies: 5
    Last Post: 07-12-2014, 02:55 PM
  4. VBA dates on a form made from a query
    By sdel_nevo in forum Programming
    Replies: 8
    Last Post: 02-06-2014, 11:56 AM
  5. Replies: 15
    Last Post: 11-18-2013, 01:49 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