Results 1 to 2 of 2

Thread: Access insert into two tables

  1. #1
    VBAX Newbie
    Joined
    Nov 2008
    Posts
    2
    Location

    Access insert into two tables

    I have a situation requiring inserting a record into one table (contact information), retrieving the index key from the new record and including it in an insert statement for a second table (event participation).

    Table Contact - ID, Surname, Title...
    Table Participants - ID, contact.ID, role...

    On my form I want to allow select from existing contacts (easy - I can do that) or allow add a new contact record inserted if the contact does not exist and capture the new contact record ID for insert statement into Participants.

    I am having a mental block, this should not be hard to do

    Anyone have a sample showing how to do this?

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    It is obviously possible using VBA, but why bother, it is normal to do this using a Main Form and Subform where the Master/Child Links take care of the updating of the subform and table.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •