Results 1 to 3 of 3
  1. #1
    Blings's Avatar
    Blings is offline Competent Performer
    Windows 10 Office 365
    Join Date
    May 2020
    Location
    London, UK
    Posts
    125

    Small Business - Access Customer Database - Table Relationship Query

    Dear reader,



    Thank you for your time in opening this thread to start reading my query.

    I am building a small customer database access app for my fathers friends business. The database is to keep a record of 'clients' (business names, addresses etc) and the 'customers' (people names, email addresses etc) who are the people that work at the business.

    In order to keep my question as simple as possible I hope it's okay that I share screenshots as I am a beginner with MS Access.

    Below is the Home page.

    Click image for larger version. 

Name:	Annotation 2020-05-17 184443.png 
Views:	16 
Size:	88.7 KB 
ID:	41921

    Screenshot below of View All which is the 'Clients' table.

    Click image for larger version. 

Name:	Annotation 2020-05-17 1844431.png 
Views:	15 
Size:	28.1 KB 
ID:	41922

    Once the detail button is clicked it opens up that particular 'clients' ID as per below.

    Click image for larger version. 

Name:	Annotation 2020-05-17 184747.png 
Views:	16 
Size:	42.8 KB 
ID:	41923

    This is where I need your help in answering my question, please! I have created a table named 'Customers' which stores the information of the people that work at this particular business. When the people button is clicked this will lead to the page as per below.

    Click image for larger version. 

Name:	Annotation 2020-05-17 185012.png 
Views:	15 
Size:	12.7 KB 
ID:	41924

    I have manually added myself 'Greg Owen' to the customers table which at the moment this list will list all people work are within the database. I want to add a button of add new which will take the user to a form which they can capture the details of a person working at as per our business example Province Lighting. How do I ensure that the person added is directly linked to this specific business ID only?

    Any assistance would be appreciated please.
    Last edited by Blings; 05-17-2020 at 11:58 AM. Reason: Additional information

  2. #2
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    You can use OpenArgs to pass the id of the parent record to the form. The on the forms open event you can set the parent foreign key with what ever was passed in the OpenArgs. I like to set control's default value rather than set the field directly.

    https://docs.microsoft.com/en-us/off....form.openargs

  3. #3
    Blings's Avatar
    Blings is offline Competent Performer
    Windows 10 Office 365
    Join Date
    May 2020
    Location
    London, UK
    Posts
    125
    Thanks @kd2017. I've just had a Skype call with @mike60smart who has helped me, thank you very much Mike! If anyone is looking for any access help @mike60smart is such a helpful man. I'll definitely be using this forum on a daily basis - what a great community!

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

Similar Threads

  1. Design / relationship issues with small database
    By Beachbum808 in forum Database Design
    Replies: 1
    Last Post: 05-05-2020, 04:19 AM
  2. Replies: 4
    Last Post: 03-14-2020, 05:30 PM
  3. Replies: 3
    Last Post: 05-21-2015, 07:02 AM
  4. Replies: 5
    Last Post: 05-03-2014, 02:03 PM
  5. Small Business Question
    By P5C768 in forum Access
    Replies: 1
    Last Post: 09-28-2009, 08:27 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