Results 1 to 5 of 5
  1. #1
    justmegan93 is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Jul 2016
    Posts
    8

    Question Query to show current issue of records

    HELP!

    I have a table which records data for documents within the company

    I have columns within the table which includes reference no., title, issue no. and date

    As the documents are update the tables will include multiple entries of the same ref no although will have a new issue number each time

    I am looking to create a query which will display only records with a unique reference number although the most recent (highest) issue no.



    Hope this makes sense
    Thanks for any help!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    make a query to pull only 2 fields, REF#, ISSUE#
    turn on summation totals,
    under ISSUE#, set to MAX.

    this will pull the most recent issue for each Ref#.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    As the documents are update the tables will include multiple entries of the same ref no although will have a new issue number each time
    It sounds like you may have a design issue, but it depends on your requirements.
    If a Document can have 0,1 or many References, then you have a 1 to Many relationship between tables. This would be part of a normalized design. And you could always find the latest assigned reference number without losing other reference data.
    But if the requirement is to only record the latest reference, then overwriting the current values could work (and remove previous/history record/info).

  4. #4
    justmegan93 is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Jul 2016
    Posts
    8
    Quote Originally Posted by orange View Post
    It sounds like you may have a design issue, but it depends on your requirements.
    If a Document can have 0,1 or many References, then you have a 1 to Many relationship between tables. This would be part of a normalized design. And you could always find the latest assigned reference number without losing other reference data.
    But if the requirement is to only record the latest reference, then overwriting the current values could work (and remove previous/history record/info).
    Each document will have the same reference no. although there can be many issues per reference
    e.g.
    Ref01 Issue01
    Ref01 Issue02
    Ref01 Issue03
    Ref02 Issue01
    Ref02 Issue02

    I am ultimately trying to create a form which shows only the most current issue for each reference

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    So let's go back to analysis and design of the "business problem/opportunity".

    You have Documents, Reference numbers and Issues.
    if a reference number could have Many Issues, then for any Document you need to identify which Reference(s) and which Issues apply.
    Code:
    Document--->DocumentRef<-------Ref
               AndIssue<------------Issue
    
    where table DocRefAndIssue could contain:
    Doc1  Ref100  Issue 29
    Doc1  Ref100  Issue 30
    Doc1  Ref100  Issue 34
    Doc2  Ref100  Issue 31
    Doc2  Ref101  Issue 31

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

Similar Threads

  1. Replies: 4
    Last Post: 08-25-2016, 04:19 PM
  2. Daily Job List Query - Current Date Issue
    By iProRyan in forum Queries
    Replies: 5
    Last Post: 02-14-2014, 02:39 AM
  3. Replies: 3
    Last Post: 09-19-2013, 10:18 AM
  4. Show current FY in query
    By cactuspete13 in forum Queries
    Replies: 3
    Last Post: 01-19-2013, 09:11 PM
  5. Aslways show Current Date even in Old records
    By farhanahmed in forum Programming
    Replies: 3
    Last Post: 04-03-2011, 12:56 PM

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