Results 1 to 2 of 2
  1. #1
    tonydepo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    28

    Query a table for a match field based on next record and display both records

    Hi, I have data as follows:


    Date Category ProductID Time Millisecs TrxID Image A Image B
    4/4/2022 A FFF 7:32:18 AM 0.538983 1122 ABC123 ABC123
    4/4/2022 A FFF 7:32:20 AM 0.562924 1123 ABB123 ABB123
    4/4/2022 A FFF 7:32:23 AM 0.346227 1124 ADD223 DDD333
    4/4/2022 A FFF 7:32:25 AM 0.346227 1125 DDD333 ABS444
    4/4/2022 A FFF 7:32:27 AM 0.072311 1126 ABS444 AJJ232


    I would like to output to display if "Image B" is the same as Image A in the next record. This also has to be based on the same "Category" and "ProductID" within under 5 seconds.


    Output Result:

    Date Category ProductID Time Millisecs TrxID Image A Image B
    4/4/2022 A FFF 7:32:23 AM 0.346227 1124 ADD223 DDD333
    4/4/2022 A FFF 7:32:25 AM 0.346227 1125 DDD333 ABS444
    4/4/2022 A FFF 7:32:27 AM 0.072311 1126 ABS444 AJJ232

    Thank you for the help!!
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    Use nested query to pull value from another row. Review http://allenbrowne.com/subquery-01.html#AnotherRecord
    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. Replies: 3
    Last Post: 10-06-2020, 02:09 AM
  2. Replies: 6
    Last Post: 07-03-2020, 02:04 AM
  3. Display records when two OTHER fields match
    By pdowg881 in forum Access
    Replies: 5
    Last Post: 05-21-2015, 02:20 PM
  4. Replies: 2
    Last Post: 03-30-2014, 04:57 PM
  5. Replies: 5
    Last Post: 03-01-2012, 12:59 AM

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