#1
  1. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    May 2008
    Posts
    52
    Rep Power
    11

    Angry MultiColumn Combo Values pull wrong column


    I may be not understanding how values are captured from comboboxes, but below is something that I want to capture the selected datum in the first column of combobox.

    Code:
     Me!CmbDiscName.BoundColumn = 1
            intRow = Me!CmbDiscName.Value
    Now the combobox is a very flexible one, I use it to display lists of different kinds of data and it can have from one to three columns at a given time all controlled by VBA events. The combobox when clicked (this is the event) will find a record. Second column is needed to find record but holds ID values that are duplicated, thus the selection JUMPS to the first record that matches the ID. Problem is, this tends to pull the second column, there could be many causes for that. and I just want to know is that the code above should give me the first column or is this not always the case?
  2. #2
  3. Contributing User
    ASP High Scholar (3500 - 3999 posts)

    Join Date
    Jan 2007
    Location
    Northern California
    Posts
    3,536
    Rep Power
    768
    Originally Posted by Mattwesterville
    I may be not understanding how values are captured from comboboxes, but below is something that I want to capture the selected datum in the first column of combobox.

    Code:
     Me!CmbDiscName.BoundColumn = 1
            intRow = Me!CmbDiscName.Value
    Now the combobox is a very flexible one, I use it to display lists of different kinds of data and it can have from one to three columns at a given time all controlled by VBA events. The combobox when clicked (this is the event) will find a record. Second column is needed to find record but holds ID values that are duplicated, thus the selection JUMPS to the first record that matches the ID. Problem is, this tends to pull the second column, there could be many causes for that. and I just want to know is that the code above should give me the first column or is this not always the case?
    The default Value of a combobox is the value of its bound column. If you want to specify the value of another column, you refer to its Column() property, like:
    Code:
    Me!myCombobox.Column(2)
    (Note that the column numbers are zero-based, so the above would refer to the 3rd column)
    Experience is the thing you have left when everything else is gone.

Similar Threads

  1. Debugging of a stored Procedure
    By zwieback89 in forum Microsoft SQL Server
    Replies: 0
    Last Post: January 11th, 2007, 01:01 PM
  2. Replies: 2
    Last Post: May 5th, 2006, 09:58 AM
  3. Retrieving values from dropdown combo
    By query4u in forum ASP Development
    Replies: 3
    Last Post: February 13th, 2006, 06:13 AM
  4. Replies: 3
    Last Post: October 18th, 2004, 07:50 AM
  5. Replies: 9
    Last Post: October 28th, 2003, 03:58 PM

IMN logo majestic logo threadwatch logo seochat tools logo