Results 1 to 12 of 12
  1. #1
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727

    Add new records


    All, using access 2016...I have a junction table with two FKIDs from two other tables to solve a m:m relationship...can I add new records to all three tables on one form without the user having to input ID info multiple times. If yes, how...I've tried using the junction table as the main form and subforms for the other tables but running into issues inputting data and getting data integrity errors since you cannot duplicate PKs in the subforms. I need to make it smooth for the users...

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi

    Can you upload a zipped copy of your Db so we can see the structure?

  3. #3
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    No internet access for laptop right now..but I'll try to lay it out...tbl1 PK acentID, acent name, acent descrip, tbl2 PK procID, proc name, tbl3(junction tbl)
    FK acentid, FK procID...Hope this is enough..

  4. #4
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,741
    mtm One Form - davegri-v01.zip
    This should to it. Have a look.

  5. #5
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi

    This works now
    Attached Files Attached Files

  6. #6
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,741
    This works now
    Mike, didn't see anything different in your rev except putting subform in single form view instead of datasheet.

    Here's a rev that add code to the not-in-list event that allows user to add the events.
    mtm One Form - davegri-v02.zip

    Have a go at it too, if you wish.

  7. #7
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    What do you actually want to be able to do with this Form and Data Input ??

    Please explain

  8. #8
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,741
    What do you actually want to be able to do with this Form and Data Input ??
    Perhaps you're confused. I'm not the OP.

  9. #9
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi davegri

    I am a little confused as the OP did not make any mention of a Not In List Event ??

    His question was :-

    "

    • All, using access 2016...I have a junction table with two FKIDs from two other tables to solve a m:m relationship...can I add new records to all three tables on one form without the user having to input ID info multiple times. If yes, how...I've tried using the junction table as the main form and subforms for the other tables but running into issues inputting data and getting data integrity errors since you cannot duplicate PKs in the subforms. I need to make it smooth for the users...





    • Today, 04:45 PM



  10. #10
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    @slimjen

    I strongly recommend that you DO NOT use spaces in object names.


    BAD: (has spaces)
    tbl1: acent name, acent descrip,
    tbl2: proc name,


    Better:
    (change spaces to underscores)
    tbl1: Acent_Name, Acent_Descrip,
    tbl2: Proc_Name,


    Even Better: (CamelBack)

    I would suggest using
    tbl1: AcentName, AcentDescrip,
    tbl2: ProcName,

  11. #11
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    GM all; Thanks for all your replies. I apologize if I caused any confusion. I looked at the database attached. It is similar to was envision. Users need to be able to add new records to all three tables. Looking at this database gives me a few ideas. Thank you all very much.

  12. #12
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,741
    Users need to be able to add new records to all three tables.
    That was the idea in my second DB, in post #6.

    Looking at this database gives me a few ideas. Thank you all very much.
    You're welcome and good luck with the project.

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

Similar Threads

  1. Replies: 9
    Last Post: 06-23-2019, 05:39 PM
  2. Replies: 1
    Last Post: 12-09-2016, 08:58 AM
  3. Replies: 1
    Last Post: 04-06-2016, 09:26 AM
  4. Replies: 4
    Last Post: 03-29-2014, 01:29 AM
  5. Replies: 1
    Last Post: 01-24-2013, 05:50 PM

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