Results 1 to 2 of 2
  1. #1
    hnhpak is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Jan 2015
    Location
    Karachi Pakistan
    Posts
    28

    Lookup field Query

    I have student database and making parent teacher appointments form

    We have three tables / quaries
    1. Students
    2. Guardians and Students
    3. PTM Appointments

    In PTM Appointments table first with lookup field i select student name from student table



    each student have two guardians father and mother or may be more or less

    Then we have to select the name of guardian with whom meeting is set by lookup field with multiple records selection, it may be only father only mother or father and mother

    I want in lookup field only the names of parents/ guardians of student first selected not all guardians of all students,

    I have a problem of making query for the lookup field for the names of guardians from table: [students and guardians] for only Student ID in current record of table PTM appointments.

    I will be grateful if any one can help me in this regards

    Haseeb ul Hasan

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Your table structure doesn't currently support what you want to do.

    You can do this a couple of ways but the easiest for a newer user is to have:
    PK = Primary Key
    FK = foreign key

    1. A table for students including a PK (autonumber)
    2. A table for guardians Including a PK (autonumber)
    3. A table linking students to guardians with a PK (Autonumber), a FK to the Students Table, a FK to the Guardians table, this will allow you to assign multiple guardians to each child.
    4. your PTM appointments table with a PK (Autonumber) a FK to the students table.
    5. a PTM attendees with a PK (Autonumber) a FK to the PTM Appointments table and a FK to the guardians table, this will allow you to have multiple guardians assigned to a single PTM meeting.

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

Similar Threads

  1. Update query to set null value lookup field
    By alexjose in forum Access
    Replies: 1
    Last Post: 06-24-2013, 04:26 PM
  2. Replies: 3
    Last Post: 03-07-2013, 02:29 PM
  3. Query to lookup relative field from table selection
    By shabbaranks in forum Queries
    Replies: 5
    Last Post: 12-20-2011, 11:12 AM
  4. Replies: 3
    Last Post: 12-28-2010, 10:43 PM
  5. Unmatched query to lookup part of the field
    By DMetcalfe in forum Queries
    Replies: 15
    Last Post: 10-08-2010, 05:30 AM

Tags for this Thread

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