How to copy 1 table field to another table field.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ghost1980
    New Member
    • Feb 2010
    • 5

    How to copy 1 table field to another table field.

    hi there,

    i am new to ms access and currently i am in need of help. here is my problem i need to help create a form that allow me to update 2 tables.

    example:
    PERSON1 (table 1)
    id
    name
    dob
    age

    PERSON2 (table 2)
    id
    guardian name
    guardian dob
    guardian age

    i need to create a form that allow me to update both table at once or at least by updating 1 table (table 1), it can duplicate itself to the second table (table2).

    to be specific, i need to copy the "id" from the table 1 to table 2.

    please help. much appreciated.
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    This should be a One-to-Many relationship with Person2 being the One and Person1 being the Many. It is the classic scenario for using a form/subform.
    1. Make a main form, using the Person2 table as the Record Source.
    2. Place a subform control on the main form
    3. When asked by the Wizard, choose the Person1 table as the source for the subform

    Access should automatically use the ID fields as the connecting field. When you enter a new record in the main form, entering the ID, a record in the subform will have the ID automatically filled in.

    Welcome to Bytes!

    Linq ;0)>

    Comment

    • ghost1980
      New Member
      • Feb 2010
      • 5

      #3
      hi, linq,

      thanks a lot & much appreciated. :)

      regards,
      styled

      Comment

      • nico5038
        Recognized Expert Specialist
        • Nov 2006
        • 3080

        #4
        It would be easier to normalize these tables into:
        tblPERSON
        -id
        -name
        -dob
        -age
        -role (person or guardian)
        Thus you only need one form and the role can be designed as a combobox holding the two (or later perhaps more) roles.

        Nic;o)

        Comment

        Working...