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

    Lookup field display

    I have not had any luck thus far. Let me try to explain again.



    I have a table, tblFamilyNavigator
    ID Key, Mentor1, Mentor2, Mentee1, Mentee2, StartDate, CloseDate, MentorNotes

    The mentee and mentor fields are lookups and there are 4 queries one for each field that filter from the people table to select only those that are mentors and mentees, by ID FirstName and LastName

    I created a form for this Family Navigator table and when I select a mentee or mentor it only shows the ID number. I want it to show just the First and Last Name.

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

    RowSource: SELECT ID, LastName & ", " & FirstName AS FullName FROM People ORDER BY LastName, FirstName;
    BoundColumn: 1
    ColumnCount: 2
    ColumnWidths: 0";2"
    ControlSource: appropriate field to save ID into

    http://datapigtechnologies.com/flash...combobox3.html
    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
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,938
    don't think you need the quotation marks here

    RowSource: SELECT ID, LastName & ", " & FirstName AS FullName FROM People ORDER BY LastName, FirstName;


    Should just be

    RowSource: SELECT ID, LastName , FirstName AS FullName FROM People ORDER BY LastName, FirstName;
    BoundColumn: 1

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    No, I am concatenating the two fields so both name parts will be displayed in the combobox. The quote marks are to define literal text (the comma) to include a comma in the displayed value.

    If they are not concatenated the properties would be:

    ColumnCount: 3
    ColumnWidths: 0";1";1"

    And only LastName would display in the box. And the AS Fullname alias would not be needed.
    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
    got it thanks for all your help

  6. #6
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,938
    oops - missed that

  7. #7
    linco is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Location
    Surrey, BC
    Posts
    7
    Hello!

    I am a Newbie here. I think this answers my question, but not sure how to use it!!

    Do I need to create the column FullName, and if so, where? Does it go in the table that I am pulling the First and Last name from or the table that I am loading with my form? I have successfully created a Combo box but when the User chooses, it them only shows the Last Name


    thanks,

    Lin

    Quote Originally Posted by June7 View Post
    Combobox properties:

    RowSource: SELECT ID, LastName & ", " & FirstName AS FullName FROM People ORDER BY LastName, FirstName;
    BoundColumn: 1
    ColumnCount: 2
    ColumnWidths: 0";2"
    ControlSource: appropriate field to save ID into

    http://datapigtechnologies.com/flash...combobox3.html

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    The field is created on-the-fly in the combo's row source:

    LastName & ", " & FirstName AS FullName
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Lookup Column Display
    By DDEB in forum Access
    Replies: 1
    Last Post: 05-11-2012, 04:46 PM
  2. Inventory Form with Display Lookup
    By Kbiddle in forum Forms
    Replies: 1
    Last Post: 12-23-2011, 01:16 AM
  3. Replies: 6
    Last Post: 10-20-2011, 11:27 AM
  4. Getting display value of lookup column?
    By kman42 in forum Access
    Replies: 2
    Last Post: 04-05-2011, 08:23 AM
  5. Recursive Lookup and display?
    By madyson in forum Access
    Replies: 3
    Last Post: 12-15-2009, 09:01 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