Results 1 to 6 of 6
  1. #1
    samjl6 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2016
    Posts
    3

    Creating a linked subform for client profiles


    So I am a COMPLETE beginner on Access, so you will have to respond with extremely basic answers!

    Basically, I have a client profile (made up of a form so that I can add new ones as they come in), and on each client's profile I have another form where I can see their orders/bookings. The client form uses a primary key in its table so that each new client is given a unique number. However, in the table for the orders/bookings, when I complete a new entry on the subform of a client's profile, I want it to appear in the table under the client's ID, but at the moment, it's just automatically labelling them 1, 2, 3, 4, etc. even though I've tried linking them through a relationship.

    Can someone explain how I can do this? Hope I make sense!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    The tClient table will have ClientID (autoNum)

    the tOrders table will have :
    OrderID (autonum)
    ClientID (long)

    the 2 ClientID fields will be joined in the relationships.
    this works every time.

  3. #3
    samjl6 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2016
    Posts
    3
    What should the relationship settings be? I've just tried adding an order ID and making that as the primary key rather than the client ID again and tried relating both Client IDs but now if I try fill in the subform it comes up saying "the LinkMasterFields property setting has produced this error: 'Expected: ='
    I'm happy to post my database if you want to take a look?

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Ranman's explanation was very clear (to me). Post your db if you are still having issues.

    Check your links from main form to subform, they should be set to ClientID.

    No settings on the relationship, just a straight line linking the 2 ClientID fields, with Referential Integrity.

  5. #5
    samjl6 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2016
    Posts
    3
    I'm not sure what I was doing wrong but I remade it using a wizard and all seems to be fine now! Thank you for the help though!

  6. #6
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Glad it worked out! Mark this as solved, then.

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

Similar Threads

  1. Replies: 1
    Last Post: 10-30-2014, 11:09 AM
  2. Replies: 22
    Last Post: 01-28-2013, 03:35 PM
  3. Extract age profiles of people
    By Richie27 in forum Programming
    Replies: 3
    Last Post: 05-04-2012, 12:14 PM
  4. Creating User Profiles in Access 2007
    By Ganymede in forum Security
    Replies: 3
    Last Post: 01-06-2012, 04:14 PM
  5. Creating Client Lists in Access
    By Charalampos in forum Access
    Replies: 2
    Last Post: 03-11-2011, 10:22 AM

Tags for this Thread

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