Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    513

    combobox displaying oddly after update

    I have a combobox with a column count of (6), and column widths: 0";0.25";6";0";0";0"; the bound column is 3



    Initally, and when pulled down, it displays correctly (1 narrow .25" column, and 1 wider column: 6"); however, once a value is selected, and an After Update event fires, and the combobox displays only the value of column 2, flush right in a single 6.25" wide column (!?) When you subsequently pull down, it again displays correctly, but then leaves only the value of column 2 in a single column (just as previous)

    Perplexed, but with many thanks in advance,
    Mark

  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,771
    Is this a bound combobox? Why have the hidden column if that is not the value saved? It is unusual to bind combobox to other than the first column.

    Post code.
    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
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    513
    it is unbound, and the concealed columns are used to filter the datasource

  4. #4
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    multiple columns are only visible in the dropdown. Once a selection is made, only the first visible column can be seen. Have one or more unbound text boxes with a controlsource something like

    =mycombo.column(3) to display what is in that column once a selection is made

  5. #5
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    concealed columns are used to filter the datasource
    if they are not required to be displayed then in the query grid, untick the 'show' box

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Fields that have no filter parameters and are unchecked will be dropped from the query design grid. If a field is needed in the combobox RowSource, it must be check in the grid.

    As Ajax notes, the dropdown list shows all fields for columns with a width greater than 0 but the box part shows only the BoundColumn value.
    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.

  7. #7
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    513
    since the combo box initially does display both columns, and once the code has run, I don't need to save nor see the choice, I wonder if I could run a cancel event kind of thing at the end of the code to clear the result, and onec again see all of the columns as initially?

  8. #8
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    you can only see all the columns in the drop down and you can only see the dropdown when it has the focus. The accepted solution when you want to still be able to see the values of the other columns is as per post#4

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    If you are saying the dropdown list does not display all columns, that is odd. Why would code cause that? Why would the hidden columns be needed for filtering? If the combobox RowSource includes an ID primary key which is the foreign key in records to be searched, just use the ID for filtering.

    Provide images and the code or the database for analysis.
    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. Combobox To Update Subform
    By Madmartigan in forum Forms
    Replies: 12
    Last Post: 03-19-2014, 04:21 PM
  2. Replies: 10
    Last Post: 07-23-2013, 05:07 PM
  3. Displaying text in combobox
    By tylerg11 in forum Forms
    Replies: 9
    Last Post: 01-19-2012, 11:51 AM
  4. Replies: 6
    Last Post: 07-28-2011, 04:07 AM
  5. ComboBox to update picture
    By ron727 in forum Programming
    Replies: 2
    Last Post: 05-21-2009, 06:29 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