Results 1 to 2 of 2
  1. #1
    mikneus is offline Novice
    Windows XP Access 2007
    Join Date
    May 2010

    Loop through a list of table names and compare

    I want to loop through the list of table names below the query and compare similar table names to see if targets are not equal.

    SELECT [compareCVN79 Dwg 04-26-10].Dept, [compareCVN79 Dwg 04-26-10].Target, [compareCVN79 Dwg 05-03-10].dept ,[compareCVN79 Dwg 05-03-10].Target
    FROM [compareCVN79 Dwg 04-26-10] INNER JOIN [compareCVN79 Dwg 05-03-10] ON
    [compareCVN79 Dwg 04-26-10].Confirmation = [compareCVN79 Dwg 05-03-10].Confirmation

    WHERE ((([compareCVN79 Dwg 05-03-10].Target)<>[compareCVN79 Dwg 04-26-10].[Target]));

    compareCVN79 Dwg 04-26-104/26/2010
    compareCVN79 Dwg 05-03-105/3/2010
    compareCVN79 Dwg 05-10-105/10/2010
    compareCVN79 DZ 04-26-104/26/2010
    compareCVN79 DZ 05-03-105/3/2010
    compareCVN79 LOE 04-26-104/26/2010
    compareCVN79 LOE 05-03-105/3/2010
    compareCVN79 LOE 05-10-105/10/2010
    compareCVN79 LYS Dwg 04-26-104/26/2010
    compareCVN79 LYS Dwg 05-03-105/3/2010
    compareCVN79 LYS Dwg 05-10-105/10/2010
    compareCVN79 LYS LOE 04-26-104/26/2010
    compareCVN79 LYS LOE 05-03-105/3/2010
    compareCVN79 LYS LOE 05-10-105/10/2010
    compareDwg 4-19-104/19/2010
    compareDwg 4-26-104/26/2010
    compareDwg 5-10-105/10/2010
    compareDwg 5-3-105/3/2010
    compareDZ 4-19-104/19/2010
    compareDZ 4-26-104/26/2010
    compareDZ 5-10-105/10/2010
    compareDZ 5-3-105/3/2010
    compareSORD 4-19-104/19/2010
    compareSORD 4-26-104/26/2010
    compareSORD 5-10-105/10/2010
    compareSORD 5-3-105/3/2010
    compareUnbudget Drawings 4-26-104/26/2010
    compareUnbudget Drawings 5-10-105/10/2010
    compareUnbudget Drawings 5-3-105/3/2010
    compareUnbudgeted DZs 4-26-104/26/2010
    compareUnbudgeted DZs 5-10-105/10/2010
    compareUnbudgeted DZs 5-3-105/3/2010
    compareUnbudgeted SORDs 4-26-104/26/2010
    compareUnbudgeted SORDs 5-10-105/10/2010
    compareUnbudgeted SORDs 5-3-105/3/2010

  2. #2
    PianoMan64 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2009
    Hey Mikneus,

    Since I'm not very clear as to what it is that you're wanting to compare? Are you talking Table Objects? Are you talking about comparing Records in two different Tables? This question isn't very clear. Can you elaborate on what it is that you're trying to do.


    Joe P.

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

Similar Threads

  1. Replies: 1
    Last Post: 05-17-2010, 12:21 PM
  2. How to loop code to run through entire table
    By kmajors in forum Reports
    Replies: 9
    Last Post: 04-23-2010, 09:27 AM
  3. Replies: 0
    Last Post: 08-01-2009, 12:43 PM
  4. update table in loop based on IF statement
    By LALouw in forum Access
    Replies: 0
    Last Post: 07-26-2009, 08:46 PM
  5. Loop a table to use field in query
    By jdubp in forum Programming
    Replies: 0
    Last Post: 03-04-2008, 11:48 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