Looking up Data in Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Curt Marquardt
    New Member
    • Oct 2011
    • 1

    Looking up Data in Access

    I am a teacher and I am creating a database to help me record my parent contact that I make over the course of the year. I have made a table that has all of the students' information in it:

    ID Number (primary key)
    Student name
    Subject
    Period
    Parent name
    Phone number
    Email address.

    In my perfect world, I would have a second table that would be my contact home table:

    Contact Number (primary key)
    Student Name
    Parent name
    Phone number
    Contact Notes (where I would write what I called about)

    What I would like to do is create a form using my contact home table that I could have by my phone. Here I could type in the name of my student and access would fill in the other two fields (parent name and phone number) for me. I could call and leave some notes in the contact notes field. Any help would be great.

    Thanks
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Leave those fields out entirely. There's actually no need to repeat them. And instead of the student name, store the unique id (primary key) from the student table.

    That way, you can join the two tables and get all the information without having to repeat it.

    Code:
    SELECT [student name], [parent name], [phone number], [contact notes]
    FROM students
    INNER JOIN contacts
    ON students.[ID number] = contacts.[student ID number]

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32634

      #3
      Perfect answer first time :-)

      You may want to check out Marking a Post as 'Best Answer' if you're happy with it.

      Comment

      Working...