9

How to display the second column in ComboBox after selection?

 2 years ago
source link: https://www.codesd.com/item/how-to-display-the-second-column-in-combobox-after-selection.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

How to display the second column in ComboBox after selection?

advertisements

I can click on my ComboBox and see the values of Column1 and Column2, but after I click on off the ComboBox, the value in Column1 is always displayed and I want the value of Column2 displayed.

I tried this:

        With ComboBox2
            .Value = "None"
            .ColumnHeads = True
            .ColumnCount = 2
            .ColumnWidths = "50;100"
            .RowSource = "SetupQuestions!A42:B48"
            .BoundColumn = 2
        End With

That didn't set the value as I thought it would.

I tried this:

Private Sub ComboBox2_AfterUpdate()
    ComboBox2.Value = ComboBox2.Column(2)
End Sub

That didn't set the value as I thought it would.

How can I force the ComboBox to display the value in Column2 after a selection is made?


Argh! It's not .Value

It's .Text

Private Sub ComboBox2_AfterUpdate()
    Me.ComboBox2.text = Me.ComboBox2.Column(1)
End Sub

Related Articles

how to exclude the second column from the selector

my question is how I can change the selector so that it wil exclude the second column off the hover event I did try some other variations like nth-child, but no luck yet. Could there be something wrong with the syntax maybe?? $('.row_class td:not(:eq

How to display the second word first with the dot

I have an issue to display the name in the web site. we get the clientUserName(first and last name) in a single string. Now I want to display the first and last name first char with a dot. if the clientUserName is Srirama Reddy I need to display Srir

Oracle: How to display the second or third letter in each sentence word as a CAPITAL letter in Oracle

how to display second or third letter in each word of sentence as CAPITAL letter in Oracle. Testdata: hyderabad Output: hYderabad or hyDerabadUse this for 2nd digit as upper case. WITH TBL(TESTDATA) AS ( SELECT 'hyderabad' FROM DUAL UNION SELECT 'pun

Insert in a column by selecting another column in another table, but how to fill the second column

i have a table which has two columns i'd fill one of the columns by selecting other table column data but how can i fill the next column cause i can't use VALUE. Here's the code INSERT INTO Numbers(number, val) SELECT LaptopID FROM Laptop WHERE Lapto

How to display the second largest value rather than the lowest value

Actually, I have to display the value of two highest grades but when I execute it shows the two highest value twice. So where is my error? #include <stdio.h> int main(void) { float a,b,c,d=0,L,H; printf("Enter number of students:"); scanf(

How to get the second column value of the row invoked in the table?

In below context menu example .. how to get value of second column that invoked it? Refer Link tried with $(this).find('td:second').text() but it didnt work. :P How to do this?No need to write such this long code here. Just assign a class name to eac

How to display the scroll bars in TScrollBox after being rendered visible again?

I've ran into one small problem. I am dynamically generating some controls and place them on a TScrollbox component. But I noticed that if the scrollbox is visible, user can clearly see each of the controls being created and placed. So it looks like

how to display the euro symbol in css after and before the pseudo-elements

I can't figure out how to let CSS display the Euro symbol (€) in :before and :after pseudoelements. .my-span:after { content: '€'; } Tried with the symbol €, u20AC and %u20AC. Nothing seems to work. Thanks in advance.Using the character "€" as s

display the values ​​in the second drop-down list after selecting the value in the first drop-down list

There are 2 tables in my database Fruits id name 1 apple 2 mango Vegetables id name 1 brinjal 2 ladyfinger i have a dropdown menu in which there are 2 values that are stored by default <select> <option value="fruits">fruits</optio

How to display the second page in pagination

I am able to view 1st page upon search but if data is more than 10 rows than its showing me full grid bind. How can i view the 2nd page public void fncfillApplication() { try { DataSet ds = new DataSet(); ds.ReadXml(Server.MapPath("Application.xml&qu

How to display the second tab in Android while calling from an activity

Here is the Code which I'm Trying. How to go to Tab2 from Sample? Please help me to Solve this. public class DemoTab extends TabActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentVi

How to display the second Modal ViewController in the UINavigationController by program

In one of my UINavigationController views user can press "add" button to select photo from the album using UIImagePickerController. When user will select desired photo I want to move him to AddPhotoViewController view where he can add title and

how to display the entire entry in String after execution?

this is a simple coding i need to do.. the problem is, after running, it will display for example, "Today is 2 and 2 day later is Thursday." instead of "Today is Tuesday and 2 days later is Thursday." import java.util.Scanner; public c

Codeigniter - How to display the results of the database vertically as columns instead of rows

I have a database table that has 21 columns and I want to display all of them, so I decided to try and put the table vertically. The first column would be the 'Headers' followed by each column displaying a row of data from the database. |--------|---

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK