Results 1 to 4 of 4
  1. #1
    robins76jd is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2010
    Posts
    2

    How to populate fields from records in sep. table

    Obviously, I'm not great with Access. I think this should be somewhat simple, yet can't figure it out. I have a table with several records in it. I want to create "form" (maybe??) to make it easier for my secretary to update student information. On the header of the form I'd like to have the student's firstname, lastname, & gradelevel fields pulled and automatically filled in from the records in the table. In the details of the form, I would like my secretary to simply enter completion dates and grades for certain tasks (other fields in the aforementioned) table which would in turn update the fields in the table.



    Am I making sense, or am I way off?

    Thanks for any help!

  2. #2
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    Hi,

    reading your post I think you should have more then one table, for example:

    one with the student information:

    tblStudents
    --------------
    stuID (autonumber) = PK
    stuFirstName (text)
    stuLastName (text)
    stuBirthdate (date/time)
    .............

    one with the tasks information:

    tblTasks
    ---------
    taskID (autonumber) = PK
    taskdescription (text)
    ...............

    one that combines the two:
    --------------------------

    tblStudentTasks
    -------------------
    sttID (autonumber) = PK
    sttStudent (long integer) = FK to stuID
    sttTask (long integer) = FK to taskID
    sttCompletedOn (date/time)
    .....

    Then you can create a form for frmStudents :Record Source =tblStudents, and a subform fsfrStudentTasks: RecordSource = tblStudentTasks.

    If you have defined the relationships right, then once you place the subform on the form, the link field properties should be set automatically.

    succes
    NG

  3. #3
    robins76jd is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2010
    Posts
    2

    Thanks...heading in the right direction....

    but what is PK and FK? I just feel like I'm soooo close. I've already had the multiple tables created....I think I might be having the problem with linking/ creating the relationships. I guess this is what I get for always relying on Excel to do an Access job.

  4. #4
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    Hi

    PK = Primary key.
    This is a unique field that cannot be empty (Null) and defines the whole record. For instance your social security number. Once the police enters this number in their computer they know your name, where you live ect... . Only for database purposes this number defines the record for the computer, not humans, so most of the time this is a simple autonumber field. You can set the PK in the design view of an Access table.

    FK = Foreign key.
    This is the linked field in a related table that refers to a PK field of the table on the 1 side of the one to many relationship. For instance you have customer nr. 5 in the table tblStudents. In the table tblStudentsTasks all you have to do is fill in the number 5 in the field sttStudent. If there is a correct relationship defined between the two tables, the database will be able to look up the data in tblStudents for the student that has number 5 to retrieve the correct name, birthdate ect.

    To know how to define those relationships, just buy a basic book or look up an online course.

    regards
    Noëlla

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

Similar Threads

  1. Using random fields in Excel to populate Access table
    By cryswater in forum Import/Export Data
    Replies: 3
    Last Post: 05-14-2013, 02:50 PM
  2. Query and populate fields
    By isnpms in forum Access
    Replies: 9
    Last Post: 08-28-2010, 08:31 AM
  3. auto populate mutiple fields
    By jomoan58 in forum Access
    Replies: 1
    Last Post: 07-23-2010, 01:03 PM
  4. Replies: 5
    Last Post: 01-05-2010, 10:22 PM
  5. Auto populate fields on a form
    By ldarley in forum Forms
    Replies: 0
    Last Post: 08-14-2008, 09:39 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