Results 1 to 5 of 5
  1. #1
    rhubarb is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Sep 2011
    Posts
    76

    SubForm Combobox Query not producing proper results

    Hi All,



    I've added a subform onto my main form. In this subform is a combobox that uses a query to look up tblEmployees.FullName and is tied to the main form by a junction table tblEmployeestoTicket.
    When using the drop-down it shows me the ID of the employee instead of the full name which makes total sense because there is no FullName field in the junction table. I'd like it so users can see the full name of the employee to assign it to the ticket.

    The relationship looks like the image below.

    Click image for larger version. 

Name:	5-28-2015 11-58-09 AM.png 
Views:	10 
Size:	7.2 KB 
ID:	20845

    The business logic states that an employee can be assigned to multiple ticket numbers so I use the junction tblEmployeestoTicket to map the many-to-many relationship between employee(s) and the ticket.

    I'm not sure that's the best solution. Any ideas?

    Thanks for any help!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    In the query that fills the combo, It needs 2 fields, ID, and name.
    in combo properties, set
    columns =2
    col widths= 0;2

    users don't care about the ID, just the name.

  3. #3
    rhubarb is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Sep 2011
    Posts
    76
    Thanks for the response.

    Yes, I set this up but the junction table that the subform is based on doesn't know what the name is, only what the ID is. The ID maps to the name in the other table. So the query works fine, but if I load my main form it prompts for name.

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    you need a query, qsNames
    with ID , NAME
    put this query in the join

  5. #5
    rhubarb is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Sep 2011
    Posts
    76
    I think I was over thinking this.

    My combo box row source was a query for fullname against tblEmployees, while the Control Source was EmployeeID from the tblEmployeestoTicket table. Finally, my subform linked Ticket Number to EmployeeID.

    Thanks for steering me in the right direction!

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

Similar Threads

  1. Replies: 3
    Last Post: 05-03-2015, 10:28 AM
  2. Replies: 9
    Last Post: 05-27-2014, 04:53 PM
  3. PDF or XPS button intermittently producing zoomed in results
    By kattatonic1 in forum Import/Export Data
    Replies: 1
    Last Post: 05-14-2014, 12:12 PM
  4. HELP Subform is producing multiple records
    By VeganLiving in forum Forms
    Replies: 7
    Last Post: 08-21-2013, 12:00 PM
  5. Queries & Macros aren't producing results after system crash
    By Nashskye13 in forum Database Design
    Replies: 2
    Last Post: 06-07-2012, 03:12 PM

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