Results 1 to 3 of 3
  1. #1
    Chris2810 is offline Novice
    Windows 8 Access 2016
    Join Date
    Feb 2016
    Location
    Missouri, United States
    Posts
    9

    Using a combo Box in a table to look up a value in another table

    Hello everyone.



    I just learned how to put combo boxes in tables by reading forum posts and watching YouTube videos. However, after doing all of the necessary steps in design view, it does not work (I understand that many Access programmers recommend against putting combo boxes in tables, but for now I need to get this figured out).

    I created two tables just to experiment with: Table1 and Employees.

    Table 1 simply has 2 fields. The first field is a primary key with an auto number. The 2nd field has the combo box and is supposed to let the user select the employee name from the Employees table.

    Row source for the combo box: SELECT [EMPLOYEEID], [LAST NAME] FROM EMPLOYEES ORDER BY [LAST NAME];

    The bound column is 1 which is the primary key.

    The column count is 2

    Now the weird part about this is that I am using a template that has a table with a combo box that works. When I try to mimic this same table design on a different table, it does not work.

    When I open up Table1 (my experiment table) in datasheet view, I click the drop down arrow, and a window pops up asking me to enter the parameter value for the last name.

    So why does it work for the other table and not the one I created? The combo box properties are identical. I can't figure out what I'm doing wrong.

    Thanks in advance for the help!

    Jessica

  2. #2
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Read this and then put your combo boxes in forms and not tables.

    http://access.mvps.org/access/lookupfields.htm

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    in a table it is referred to as a LookUp field type; when you add this to the table the wizard will launch - when you select the table to look up the wizard is going to bind the primary key field (unseen) and visually display the 2nd field you add...... It is this phenomena of the actual value and the displayed value being different that can both cause confusion as well as lead some developers to avoid the use of the LookUp field. But once you are familiar with it there is not really any problem either way. Also I should mention: One can manually change which is bound and which displays after the fact by altering the look up field's properties.

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

Similar Threads

  1. Replies: 5
    Last Post: 12-01-2015, 02:22 PM
  2. Replies: 11
    Last Post: 09-03-2015, 11:12 AM
  3. Replies: 2
    Last Post: 10-10-2014, 05:33 AM
  4. Replies: 25
    Last Post: 03-19-2013, 10:08 PM
  5. Replies: 1
    Last Post: 08-13-2011, 12:03 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