Results 1 to 3 of 3
  1. #1
    TerraEarth is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    86

    Setting up a query-able/modifiable one-to-many or none relationship

    I have two pieces of information that need to be linked in a one-to-many OR None type of relationship: Company info & Address info.

    Take the following: {CompanyA: [Address_A1, Address_A2, Address_A_4], CompanyB: [], CompanyC: [Address_C1]}
    In this data, companies can have 0, 1 or many addresses. Is this accomplishable in Access or is there perhaps another workaround for this type of data?

    Additionally, i want to develop some functionality where users can query a specific Company (Say A) and check all the addresses listed under that company. If, for example, Address_A2 is a faulty address the user will then be able to correct/modify or perhaps even delete that Address so that it will be reflected as such in the DB. What I mean by this is, for every registered Address_A2 in the DB, it will be flipped to become Address_A4 (new).



    How would you guys go about setting up for this?

  2. #2
    GinaWhipp's Avatar
    GinaWhipp is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2011
    Location
    Ohio, USA
    Posts
    377
    I would use a Main Form\Subform. Main Form to look up Company and Subform to view addresses.

  3. #3
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    If you want to show all companies including those with no address data, use a left join to link your two tables so it gets all records from the company table and any address data where it exists
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

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

Similar Threads

  1. Error Setting up Query
    By bishmedia in forum Access
    Replies: 4
    Last Post: 07-27-2018, 01:32 PM
  2. Setting a default value of 0 in a query
    By Access_Novice in forum Queries
    Replies: 1
    Last Post: 10-23-2014, 11:41 PM
  3. Replies: 19
    Last Post: 03-11-2014, 10:02 PM
  4. Replies: 7
    Last Post: 10-03-2011, 02:46 PM
  5. non modifiable form opens on clicking .mdb
    By kkukreja in forum Access
    Replies: 1
    Last Post: 02-09-2011, 04:47 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