Results 1 to 10 of 10
  1. #1
    LaughingBull is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Toledo Ohio
    Posts
    143

    lookup dropdown list

    I have a people table for all the people
    I set a query to select only those that are Family Navigator Mentors ID,FName,LName
    I use this query for a lookup on the family navigator table to select a mentor


    on the form I want the ID FName and LName to show up not just the ID.????

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Recommend combobox properties:

    RowSource: SELECT ID, LName & ", " & FName AS FullName FROM tablename ORDER BY LName;
    BoundColumn: 1
    ControlSource: as appropriate to save ID
    ColumnCount: 2
    ColumnWidths: 0";2"

    Expressions in textboxes can reference combobox columns by index. Index begins with zero.

    =[comboboxname].[Column](1)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    LaughingBull is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Toledo Ohio
    Posts
    143
    the combobox on the form properties are SELECT [FamilNavigatorMentorQuery].[ID], [FamilNavigatorMentorQuery].[FirstName], [FamilNavigatorMentorQuery].[LastName] FROM FamilNavigatorMentorQuery ORDER BY [LastName]; but only the ID shows up

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Need to set ColumnCount and ColumnWidths properties as suggested.

    Recommend concatenating LName and FName.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    LaughingBull is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Toledo Ohio
    Posts
    143
    here is the options for the properties Column Widths is not an optionClick image for larger version. 

Name:	combobox.jpg 
Views:	9 
Size:	182.5 KB 
ID:	22412

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    On the Format (or All) tab.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    LaughingBull is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Toledo Ohio
    Posts
    143
    I set it all like you said the SELECT [FamilNavigatorMentorQuery].[ID], [FamilNavigatorMentorQuery].[FirstName], & ”,” & [FamilNavigatorMentorQuery].[LastName] AS FullName;FROM FamilNavigatorMentorQuery ORDER BY [LastName]; and I get this error message when I click the down arrow to select a mentor Click image for larger version. 

Name:	combobox1.jpg 
Views:	9 
Size:	57.6 KB 
ID:	22413

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Remove the comma (,) after [FirstName] in front of &. Remove the ; in front of FROM, put a space in there.

    Look at my example again - I corrected it to remove my typo on the bad ;.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    LaughingBull is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Toledo Ohio
    Posts
    143
    SELECT [FamilNavigatorMentorQuery].[ID], FamilNavigatorMentorQuery.FirstName & [”], [”] & FamilNavigatorMentorQuery.LastName AS FullName FROM FamilNavigatorMentorQuery ORDER BY [LastName];
    now I get this when I click the arrow Click image for larger version. 

Name:	combobox12.jpg 
Views:	9 
Size:	81.5 KB 
ID:	22414

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Why are you enclosing quote marks in []? Brackets define a field or object.

    Also, Access doesn't like slanted (”,”) marks. Should be ", "
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Add to the dropdown list
    By tanyalee123 in forum Forms
    Replies: 1
    Last Post: 11-13-2013, 01:18 PM
  2. Dropdown list
    By imintrouble in forum Access
    Replies: 2
    Last Post: 01-20-2012, 08:09 AM
  3. Dropdown list
    By stratack in forum Access
    Replies: 1
    Last Post: 07-25-2011, 06:58 AM
  4. Dropdown List: Use Each Item Once?
    By Heavy Doody in forum Access
    Replies: 1
    Last Post: 05-02-2011, 07:44 AM
  5. Set up a dropdown List
    By asherbear in forum Access
    Replies: 2
    Last Post: 06-24-2010, 06:45 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