Comparing 2 Tables in a Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tcveltma
    New Member
    • Jul 2007
    • 36

    Comparing 2 Tables in a Query

    Hi Everyone,

    I know there's been a lot of questions regarding the same kind of issue but I haven't been able to find an answer to my specific problem. Basically I have two tables, one table showing planned hours for a week and one table showing actual hours for that week.
    At the beginning of each week employees are supposed to fill out the hours the expect to spend on each task. Then at the end of the week, they input the actual hours they spent on each task. This is done through a form which goes into the tables mentioned above. At the end of the month/year, we want to be able to compare how accurate the planned hours were compared to the actual hours. I think I have to do something regarding a find unmatched query, but I also need to be able to see the matched items as well. Below are my tables with their respective fields, as well as something along the lines of what I'm trying to make the query look like. (table, fields)

    Planned Table
    Week
    Specific Task
    Region
    Hours


    Actual Table
    Week
    Specific Task
    Region
    Hours



    Hopefully the query can look something like this (I don't know how to do a table layout in the form yet so hopefully you get the idea


    Week....... Specific Task........... . Region..... Planned Hours.......... Actual Hours
    8/6/2007... Meeting........ ............ AB........... 6.............. ............... . 6
    8/6/2007... Budget......... ............ AB........... 4.............. ............... . 3
    8/6/2007... Budget......... ............ BC........... 0.............. ............... . 1

    If anyone could tell me if there is a way to do this, I would really appreciate it.

    Thanks,
    Tiffany
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Why not have an extra field in one table and then you can have a PlannedHours and ActualHours field? Then you can get rid of the other table.

    Comment

    • tcveltma
      New Member
      • Jul 2007
      • 36

      #3
      That would provide a much simpler solution. I'll see if I can set it up in my form. Thanks for the advice

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Originally posted by tcveltma
        That would provide a much simpler solution. I'll see if I can set it up in my form. Thanks for the advice
        You'll have to change your table structure too, adding a new field.
        Let us know if you run into any trouble.

        Comment

        Working...