Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Kookai is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2010
    Posts
    32
    Quote Originally Posted by weekend00 View Post
    I think your two table are similar to my example ones. So, just change the fields names in my queries and add the fields you want to the result.
    Yeah Ref1 & ref2 has something to do with revision no....

    Like for example...



    DocID Ref1 Ref2 Subject Rev Rev date rev status
    1 ALD-01 DEL-01 Pipes 0 08-16-10 Preliminary
    1 ALD-01 DEL-01 Pipes 1 08-17-10 Preliminary

  2. #17
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    I created 2 table as your screenshot, if there is any error when you open the query, it maybe some typepo of field names, please check the field names.

    I did not find any date field to identify the "most recent" revision, so I assume the max pkDocumentDrawingRevID is the most recent one.

    Step 1: Create query "getMostRecentRev" as:

    SELECT Max(tblDocumentDrawingRev.pkDocumentDrawingRevID) AS MaxOfpkDocumentDrawingRevID, tblDocumentDrawingRev.fkDocumentDrawingID
    FROM tblDocumentDrawingRev
    GROUP BY tblDocumentDrawingRev.fkDocumentDrawingID;

    Step 2: Create query "Result" as:

    SELECT tblDocumentDrawingRev.*, tblDocumentDrawings.*
    FROM (getMostRecentRev INNER JOIN tblDocumentDrawingRev ON getMostRecentRev.MaxOfpkDocumentDrawingRevID = tblDocumentDrawingRev.pkDocumentDrawingRevID) INNER JOIN tblDocumentDrawings ON getMostRecentRev.fkDocumentDrawingID = tblDocumentDrawings.pkDocumentDrawingID;

    open query "Result" to get the information of latest revision or use this query as data source of your report.

  3. #18
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    check the sample

  4. #19
    Kookai is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2010
    Posts
    32
    Hi Maximus,

    Please find attached thanks... ur help is much appreciated

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Latest Transaction Report
    By Worm in forum Reports
    Replies: 3
    Last Post: 08-16-2010, 06:10 AM
  2. Query latest record
    By asherbear in forum Queries
    Replies: 5
    Last Post: 08-02-2010, 03:58 PM
  3. Selecting Most Current 'Revision'
    By Nola_Gal in forum Queries
    Replies: 5
    Last Post: 05-29-2010, 12:48 AM
  4. Latest Date Records
    By Rick West in forum Queries
    Replies: 1
    Last Post: 09-25-2009, 11:16 AM
  5. Replies: 2
    Last Post: 12-09-2005, 01:58 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