Results 1 to 3 of 3
  1. #1
    LukeJ Innov is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    31

    A form to allow records to be added to existing entities

    Hello,



    I have a large database with many tables etc. But for the sake of this question I will only use a small example.
    I have two tables the first of which is 'Company' the Second is 'Company Contacts' linked by a primary key on the 'Company' table called 'Company ID'.
    I would like to know how I would create a form that would allow me to add a contact to a previously existing 'Company' without having to manually write the primary key, for example selecting a company from a drop down box, then the primary key for the new contact would update and show correctly.

    Regards

    Luke.J

  2. #2
    Beetle is offline Unrelatable
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    Camp Swampy (Denver, CO)
    Posts
    207
    Just to clarify, given a table structure like the following;

    tblCompany
    CompanyID (PK)
    CompanyName

    tblContacts
    ContactID (PK)
    CompanyID (FK to tblCompanies)
    ContactName

    You would then use a main form / sub form set up and the Master Child link property of the Subform Control (the Subform Control is the "window" that contains the sub form) handles the insertion of the foreign key value in the child table when new records are added in the sub form

  3. #3
    LukeJ Innov is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    31
    Hi,

    Yes the table structure is like that.
    Now its fine using a subform, but can you have more than one subform sitting on a main form? The wizard only lets you properly create one subform.
    And I don't like using wizards anyway.

    No need I figured it out, thanks for your help!!
    Thanks
    Last edited by LukeJ Innov; 05-02-2013 at 03:26 AM. Reason: Completed it.

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

Similar Threads

  1. Replies: 1
    Last Post: 02-16-2013, 11:36 AM
  2. ACCESS form does not show added records from sharepoint
    By WillemdeNie in forum SharePoint
    Replies: 0
    Last Post: 08-26-2012, 06:46 AM
  3. Replies: 2
    Last Post: 05-02-2012, 09:16 PM
  4. Replies: 6
    Last Post: 04-27-2011, 06:12 AM
  5. Replies: 0
    Last Post: 02-09-2011, 03:10 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