Results 1 to 3 of 3
  1. #1
    GoldiRocks is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    1

    Trouble with combo boxes on Forms

    Hi, I'm having some issues with the combo boxes I've created on my form. It is pulling the information from the wrong column on my table. I don't have lookup values in my table.



    Also, when I create a report from the form, it is pulling from the ID column instead of the column where the information is kept.

    Any ideas how I can fix this?

    Thank you

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    always helps to provide examples of what you are actually doing, sow we either need to guess or provide a broad response.

    It is pulling the information from the wrong column on my table.
    is either due to your rowsource or your bound column being incorrect in the combo control
    it is pulling from the ID column instead of the column where the information is kept.
    assuming this is being displayed in a textbox and not a combo on your report - in your report you need to include the table where this data can be found and include the relevant field in your select statement

  3. #3
    Join Date
    Apr 2017
    Posts
    1,679
    Let's assume you have a table YourTable: YourTableID, Field3, Field2, Field3, and a lookup table (don't confuse it with lookup field in table) LookupTable: LookupTableID, LookupValue. In your form based on YourTable you have a combo box with proprties ControlSource = Field3, RowSource = 'SELECT LookupTableID, LookupValue FROM LookupTable ORDER BY 2', BoundColumn = 1, ColumnCount = 2, and ColumnWidths = '0, 2.5'

    In your form, in combo you select/see LookupValue's from LookupTable, but in YourTable, LookupTableID's are stored. When you want in e.g. query to see LookupValue's instead, the query must be like
    Code:
    SELECT yt.Field1, yt.Field2, lt.LookupValue FROM YourTable yt LEFT OUTER JOIN LookupTable lt ON lt.LookupableID = yt.Field3

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

Similar Threads

  1. Replies: 28
    Last Post: 01-28-2015, 02:24 PM
  2. Replies: 9
    Last Post: 04-04-2014, 03:30 PM
  3. Combo Boxes on Forms
    By lucy1216 in forum Forms
    Replies: 1
    Last Post: 04-30-2013, 09:10 AM
  4. Trouble programming combo boxes
    By trolleri in forum Forms
    Replies: 6
    Last Post: 04-10-2013, 02:00 PM
  5. Cascading Combo Boxes trouble
    By Monterey_Manzer in forum Access
    Replies: 4
    Last Post: 09-13-2012, 11:06 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