Results 1 to 2 of 2
  1. #1
    epardo87 is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Dec 2016
    Posts
    101

    Table look up reference retrieves ID instead of field

    Hello,




    • I have a table with columns: employeeID, FullName and Supervisor
    • the supervisor column is referenced to the column "supervisor" in another table which also has another column "ID" which I didn't select
    • it shows the name of the supervisor correctly
    • In a form, I'm using a Dlookup to retrieve the "Supervisor" by searching the "FullName" and instead of retrieving what is displayed in that column, it is retrieving the ID of the supervisor...


    why is that? how can I have the name retrieved instead of the ID number?

    this is the SQL of the field:

    SELECT [tbl-Supervisors].ID, [tbl-Supervisors].Supervisor FROM [tbl-Supervisors];

    I'd appreciate your help a lot! thanks!

  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,930
    DLookup is inefficient method to retrieve the supervisor name to a form textbox or to table field. Properly constructed combobox or table lookup should be able to show the name while saving the ID.

    That is the SQL statement for a combobox or lookup RowSource?
    Is the BoundColumn property set to 0?
    Is the ColumnCount property set to 2?
    Is the ColumnWidths property set like 0";2"?

    I never set lookups in tables. I build forms with comboboxes.
    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. Query to update a field from a reference table
    By PCartland in forum Queries
    Replies: 8
    Last Post: 02-03-2017, 02:29 PM
  2. Replies: 5
    Last Post: 02-13-2015, 07:24 PM
  3. Replies: 16
    Last Post: 03-26-2013, 07:11 PM
  4. Replies: 3
    Last Post: 03-09-2012, 09:00 AM
  5. Replies: 2
    Last Post: 05-09-2010, 04:10 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