Results 1 to 5 of 5
  1. #1
    smg is offline Competent Performer
    Windows XP Access 2010 64bit
    Join Date
    Apr 2019
    Posts
    121

    in combo box I want to show Code and Description


    I created a combo box based on a query with Error Code and Description. When I view the form I want to see both fields, however, only Error Code Field displays. How do I get both to display?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    http://www.baldyweb.com/Autofill.htm

    or you can create a concatenated field as the visible field of your combo.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    you usually need a combo column for every field that is in the combo's row source. You either don't have enough columns, or some have their widths set to zero. Column widths and count properties are on the property sheet Format tab.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    The Column property is zero based, so 2 is the third column
    Ummm, with all due respect, I don't think so. Not according to M$.
    The ColumnCount property holds an integer between 1 and the maximum number of fields in the table, query, or SQL statement, or the maximum number of values in the value list, specified in the RowSource property of the control.
    While zero is a valid value for the property, if used it refers to the Index (row number) of a list item thus it isn't part of the row source. If the row source has 3 fields, the column count is 3, and 3 is the 3rd column. I used to think it was zero based as well - because of similar counts being zero based and the fact that zero is a valid column property. It's just not a 'member' of the row source.

    Am I interpreting that statement incorrectly?
    EDIT
    Seems that I am, somehow. I should play in the sandbox before throwing any sand.
    Now I have to figure out where I got 0 as the index of a row. Perhaps listbox...
    Edit2 - I see that I confused the ColumnCount property with the Column property.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    smg is offline Competent Performer
    Windows XP Access 2010 64bit
    Join Date
    Apr 2019
    Posts
    121
    i changed the column count to 2 in the format tab and that did the trick! Thank you all.

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

Similar Threads

  1. Replies: 4
    Last Post: 11-07-2017, 02:09 PM
  2. auto populate description when code is entered...
    By willmafingerdo in forum Programming
    Replies: 5
    Last Post: 06-07-2016, 12:25 PM
  3. Replies: 3
    Last Post: 04-03-2014, 08:13 AM
  4. i want to show description when i write the code
    By Mina Garas in forum Access
    Replies: 3
    Last Post: 02-23-2012, 11:00 AM
  5. Replies: 6
    Last Post: 06-13-2011, 12:14 PM

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