Results 1 to 12 of 12
  1. #1
    JrBuds2 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jun 2017
    Posts
    6

    Confused over easy relationship issue

    Hi, I am very confused. I am creating a DB and cannot get my head around this situation.



    I have a Jobs table and a Clients table. Each Job can only have one client. My problem is now that I need to have multiple contacts for each client where only one Client and Contact can be assigned to one job.

    So Job Number "502" is for client "Virgin" and the contact is Tim at Virgin who's phone number is ......

    I am unsure on how to get around this problem as I am a Access NOOB, any help would be appreciated.

    I tried to upload the db file but it kept failing.

  2. #2
    JrBuds2 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jun 2017
    Posts
    6
    Every time I try think of how the relationship should be it ends in a loop from JobTable-ClientID to ClientTable-ClientID to ClientTable-ContactID to ContactTable-ContactID to JobTable-ContactID. It's just seems wrong and I can't get it to work.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    That's 3 tables
    tClients, tContacts, and tJobs.
    tContacts can have many recs for a tClient.
    the tJob table can only have 1 client,for 1 job, for a client,
    The tJobs fields are keys (with *) to prevent more than 1 job person per client.

    TJobs table
    -------------
    clientID*
    jobName*
    contactID

  4. #4
    JrBuds2 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jun 2017
    Posts
    6
    Thanks for the quick reply, would I need the Relationship to go From the tJob to tClient then tContact or would tJob join to both tClient and tContact?

  5. #5
    JrBuds2 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jun 2017
    Posts
    6

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    There would need to be a link each time the field name is the same and contains the same data. Client to jobs and to contacts. Contact to jobs and to client.

    (Attachments need to be added to your post, many people can't go to outside links. Click on Go Advanced, then the Attach icon, then upload your file.)

  7. #7
    JrBuds2 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jun 2017
    Posts
    6
    Hi Aytee, everytime I try to use that uploader it fails.

    I can get the relationship working (I think) but then I run into issues as on the job form they fill out the job details then select the client and from that it needs to loads the contacts for that client so the use can select which they need. Upon refreshing the form it demands a contact to be filled in but it hasn't generated the list yet.

    I think my main issue is it's wrong from the beginning, could you guys quote me how much to sort it out or is that against the rules?

  8. #8
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Click image for larger version. 

Name:	Screenshot_3.png 
Views:	10 
Size:	50.7 KB 
ID:	28957

    This is for orders, but could just as easily be jobs. Is this any help?

  9. #9
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    The contact tbl would have a ClientID field.

  10. #10
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    just as a bit of explanation. Order tbl does have a contact field but this is not defined in relationships because its not always a requirement. However. This is defined at query level. to retrieve the relevant info.

  11. #11
    JrBuds2 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jun 2017
    Posts
    6
    Thanks Homegrown that sorted my issue of not being able to refresh the form to load the relevant contacts.

  12. #12
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Do you have a screenshot of your relationships? If you can upload that maybe you can get some feedback.

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

Similar Threads

  1. Replies: 5
    Last Post: 01-08-2015, 02:08 PM
  2. Confused with database relationship...
    By cysklement in forum Access
    Replies: 4
    Last Post: 11-21-2014, 08:00 AM
  3. Replies: 1
    Last Post: 05-18-2012, 11:59 AM
  4. Easy DLookup Issue
    By Niki in forum Access
    Replies: 7
    Last Post: 05-25-2011, 03:00 PM
  5. Replies: 2
    Last Post: 04-16-2010, 09:24 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