Results 1 to 2 of 2
  1. #1
    cheserex is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    1

    Pick MAX of a list of dates in one table to update LatestDate in another

    I have a database of documents- each document has a docID. I have another table listing revisions with dates, revisor, etc.
    I would like to find a way to automatically update LastRevDate in the documents tablewith the Latest (Max) date in the Revisions table


    I've tried a query with an aggregate of [revisiondate] and can get as far as listing documents that do not meet [Lastrevdate]<>MaxofRevisiondate, but cannot update based on this.
    I have an entry form with Documents table and a subform showing the revision dates list from the Revisions table. Ideally I want to create an event that will automatically find the Max([revisiondate] and replace the [LastRevDate] in the documents table based on the common [docID]

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Why even have this field? Maintaining calculated data (data dependent on other data) is usually a bad idea. The data can get out of sync.

    If it can be calculated for an UPDATE action it can be calculated whenever needed. Could use DMax function. Or maybe a nested subquery, review http://allenbrowne.com/subquery-01.html
    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.

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

Similar Threads

  1. Can't get VBA to pick up duplicate dates
    By Remster in forum Programming
    Replies: 1
    Last Post: 04-11-2012, 06:34 AM
  2. Replies: 2
    Last Post: 02-09-2012, 04:31 AM
  3. Update table based on List Box selection
    By tpcervelo in forum Forms
    Replies: 0
    Last Post: 11-04-2010, 01:32 PM
  4. Update Field list in Table with Query
    By Scorpio11 in forum Queries
    Replies: 3
    Last Post: 07-16-2010, 01:57 PM
  5. Replies: 0
    Last Post: 05-16-2008, 07:50 AM

Tags for this Thread

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