Results 1 to 2 of 2
  1. #1
    sultana is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Posts
    2

    Smile Comparing two or three tables in a sloppy manner preferably.

    Hello there, I've been reader for awhile, finally joining up with a question!

    Layout of my question:

    3 tables:

    Table 1(account number): List of account numbers I wish to play with, around 3,000.

    Table 2(date): List of occurrences, around 3,000

    Table 3(date): List of occurrences accounted for, some values are useless, around 4,500


    I'd like to find the list of occurrences not accounted for, but here's my problem, the
    date for this in Table 2 and Table 3 are not the same and are generally days up to a
    month and a half apart, and some occurrences accounted for don't have corresponding
    occurrences in Table 1 it's impossible to be 100% correct with these, but right now
    just counting vs. the tables only yields about 65% correct, and those are generally the


    easy ones, such as no occurrences and 1 occurrence. By hand, I'd say it's correct
    probably around 97% of the time using the logic of matching occurrence.

    I'd like to do something like...

    FUNCTION1:

    "
    FOR Table1(AcctNum):
    FOR Table2(date)
    IF(AND(Table2(date(accountedfor)!=TRUE, Table3(date(accountedfor))!=TRUE),
    IF(Table2(date) - Table3(date))<46, add TRUE to AND(Table2(date(accountedfor)),
    Table2(date(accountedfor))) 0)
    "

    FUNCTION2:

    "
    FOR Table1(AcctNum):
    FOR Table2(date(accountedfor))
    IF Table2(date(accountedfor))==TRUE, Table1(AcctNum(count))=+1

    I understand this would have an issue if marking TRUE something off of either table

    before checking all instances incase they can all be accounted for incase an item in

    table1 and can linked to 2 different items in the table2 but another item can only be

    linked for 1 and the first item, "takes the slot". But I'd like to try this method out,

    it seems like the most conservative and that's okay.

    Any ideas of if there's an easy or better way to do this?

    I just know a bit of excel and a little python, which doesn't really help me much.

    Thanks so much, I look forward to learning this here stuff down good and hopefully be
    one to answer questions in time.

  2. #2
    sultana is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Posts
    2
    Any ideas on this folks?

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

Similar Threads

  1. Comparing Records in two (2) Tables.
    By RalphJ in forum Programming
    Replies: 19
    Last Post: 04-19-2011, 02:50 AM
  2. Comparing tables
    By YoungWolf in forum Database Design
    Replies: 7
    Last Post: 01-10-2011, 11:32 AM
  3. Comparing / Subtracting Tables
    By quigongrim in forum Queries
    Replies: 5
    Last Post: 09-10-2010, 06:59 PM
  4. Comparing two tables with query
    By Dnphm in forum Queries
    Replies: 2
    Last Post: 08-13-2010, 02:45 PM
  5. Help On Comparing Quantity in Tables
    By rochy81 in forum Access
    Replies: 2
    Last Post: 05-29-2009, 10:20 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