Results 1 to 6 of 6
  1. #1
    hlcarlin is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    12

    Creating new record in multiple Table through a form

    Hello,

    I am working on an access database that isn't my own. It was created in a slightly flawed way but too much work has been done in order to start from scratch so I am building off of what is done.

    My current goal is creating a from with 2 inputs that will create a new Participant:

    1) The Participant's Name
    2) The Participant's Number

    The Participant Number serves as Primary Key.

    What I would like to do is have one form create a new line in the "Participants" table recording the Participant's Name and the Participant's Number as well as insert a new line in about 10 other tables with the Participant's Number.

    Is there any way I can do this through one form or I need to use one form for each table?

    Thank you

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    What I would like to do is have one form create a new line in the "Participants" table recording the Participant's Name and the Participant's Number as well as insert a new line in about 10 other tables with the Participant's Number.
    If no other data other than the participant number is going to be added to the 10 other tables, then why bother doing it?

    If the 10 other tables are each on the many side of one-to-many relationships with the participant & other data is to be entered, then you should have 10 subforms on your main participant form. (Although 10 subforms would be kind of messy; I would probably use a tab control).

    Can you provide more information as to these other 10 tables?

  3. #3
    hlcarlin is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    12
    the PA number is used as the Primary key in the other 10 or so tables and this is required to be present before I can add any other data to a row in those tables... I simply need to insert the PA number in order to "ready" the tables to receive future data...

  4. #4
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    the PA number is used as the Primary key in the other 10 or so tables and this is required to be present before I can add any other data to a row in those tables... I simply need to insert the PA number in order to "ready" the tables to receive future data...
    The PA number cannot be the primary key in the other 10 tables unless you have one-to-one relationships between the main table and each of the other 10 tables. If you have one-to-many relationships, then the PA number would be the foreign key.

    So what type of relationship do you have between the main table and the 10 related tables?

    If you have established the relationships in Access' relationship window and you have a main form with the 10 subforms, Access will automatically make the join when you add a new record to the subform. There would be no need to "ready" the tables.

  5. #5
    Dasun is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jul 2011
    Posts
    10
    Hey....
    I was just reading the post and saw that this is the problem that Im facing too.

    I have a main form with some sub forms in it.

    My PK is ID which is autonumber
    I have uniqe key called ID_No (which is ma serial nbr for records)

    All the saubform have this "Intermediate" called relationship in them. I cud not create it as 'one to many' i dnt know why cuz it did not allow me to do when i ws creating relationships. I hope Intermediate relationship does the same task as One to Many does.
    and I have already set the link child and master link fields as ID in every one(Making all tables have one to many relationsships{technically :- "INTERMEDIATE" } with the table which main form is bound)

    So once the main form is given the ID-No input, as soon I go out of the text box(after_insert), all other subforms displays that value...... but! when I click the add record button and the subform tables do not have the record(it is not saved within the tables), Only the Record in the main form is only saved.

    My problem is why it is displaying the ID_No value in subforms but why it is not saving in subform tables

    I forgot to say that I have set Data Entry feature turned off and Allow Edits field is ON

    SOmebody help pls.....

  6. #6
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    All the saubform have this "Intermediate" called relationship in them. I cud not create it as 'one to many' i dnt know why cuz it did not allow me to do when i ws creating relationships. I hope Intermediate relationship does the same task as One to Many does.
    Usually you get the "intermediate" when the join field is not designated as unique. Can you provide more details on the tables on which the form and subform are based?

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

Similar Threads

  1. Creating a Form without a Table
    By ronocoo in forum Forms
    Replies: 11
    Last Post: 05-21-2011, 04:12 PM
  2. Replies: 5
    Last Post: 09-14-2010, 09:50 PM
  3. Replies: 4
    Last Post: 01-25-2010, 04:14 PM
  4. Replies: 3
    Last Post: 01-14-2010, 08:32 AM
  5. Creating "Edit Record" link in table column
    By joshearl in forum Forms
    Replies: 1
    Last Post: 12-25-2009, 11:17 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