Results 1 to 2 of 2
  1. #1
    kkyork is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    May 2012
    Posts
    7

    Adding Field Using Multiple Criterion

    I have a union query to which I would like to add data from a related table. However, in order to pull the data in appropriately, I need to reference two fields in the underlying table to two fields in the query.

    As a simple example, lets just say my query gives me teachers and classes by month. I'd like to add which class room the classes are held in. I have another table that shows the classrooms assigned to each teacher by month.

    Query contains the following columns headings: TeacherID, Month, Class
    Table contains the the following column headings: TeacherID, Month, Classroom



    For lack of a better way of descibing what I'd like to do (and I'll tell you I am MUCH better in excel), I'd like to lookup the classroom assignments based on the TeacherID and the month and add it to my query.

    Any ideas?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,600
    You want output like:

    TeacherID, Month, Class, Classroom

    Why not a join of the query to the table, linking on both the TeacherID and Month fields?
    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. Weird Query Results using Percentage criterion
    By david.semadeni in forum Queries
    Replies: 6
    Last Post: 04-09-2012, 10:59 AM
  2. Replies: 2
    Last Post: 03-30-2012, 07:39 AM
  3. help adding multiple entries to outlook
    By Goli1984 in forum Programming
    Replies: 1
    Last Post: 01-26-2012, 03:35 PM
  4. Query criterion for today and the future
    By scoughlan in forum Queries
    Replies: 3
    Last Post: 01-16-2012, 07:28 PM
  5. Replies: 10
    Last Post: 04-21-2010, 01:16 PM

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