Results 1 to 4 of 4
  1. #1
    phineas629 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2011
    Posts
    47

    subforms and relationship

    Hi all,



    Everyone's been so helpful on here. I tried everything but, I am really stuck.I've read through plenty of manuals, done searches in the forum and read online articles to no avail.

    Here's the relationship:

    [person] 1 --- [employee] 1--- [invoice details] ---1 [invoice]


    I have made a form "Invoice" /subform "Invoice_Details." The subform displays multiple line items employee id, bill, dates, etc. which makes one invoice.

    I want to know the actual person's name on the invoice details, not the person's employee ID. How can I do this?

    Thanks.

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    You store the ID like it is doing but you use a COMBO box on the subform which has the ROW SOURCE of it based on a select statement which uses the person table as its source and it includes the ID first and the name second and then the column count is set to 2 and the column widths are set to 0";2" which would hide the ID column but show the name.

  3. #3
    phineas629 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2011
    Posts
    47

    control source

    Hi Bob,

    What should I set the control source to? Also the names are split into first, middle, last. Should i try to make a query to put names together. I'm still very new to this.

    Thanks

  4. #4
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Control Source is the ID field you are storing the ID in for the person.

    For creating a field to display all parts you can use

    PersonName:[LastNameFieldHere] & ", " & [FirstNameFieldHere] & " " & [MiddleNameFieldHere]

    and this will show like

    Larson, Robert X

    so you could add a sort on Last, First, and Middle names in that order so they would be easy to find in that list.

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

Similar Threads

  1. subforms
    By agmorgan in forum Access
    Replies: 1
    Last Post: 08-08-2011, 06:32 AM
  2. Relationship Between Two Subforms
    By eww in forum Programming
    Replies: 2
    Last Post: 09-13-2010, 07:15 AM
  3. subforms
    By thewabit in forum Forms
    Replies: 6
    Last Post: 02-01-2010, 09:03 PM
  4. SubForms
    By duckie10 in forum Access
    Replies: 4
    Last Post: 05-17-2009, 07:15 PM
  5. Subforms
    By henryclay in forum Access
    Replies: 0
    Last Post: 07-24-2007, 07:51 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