Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Boxes - Column Count question

Status
Not open for further replies.

snoopy92211

Technical User
Jun 29, 2004
67
US
I have a list box that lists the Month, Month Begin Date, and Month End Date in 3 separate columns.

The format is as follows:
Column count: 3
column width: .6;0;0

The only visible column is that actual month.

I would like to use the after update event in this box to pass the value of the second and third columns to 2 text boxes.

here's what the list box shows:

january
february
march

Using the After Update, if I choose january,
text box 1 will have: 0101 text box 2 will have: 0131

How can I do this? This is what I tried:

in after update, I have this: me.textbox109 = me.lstperiod. This works, but it doesn't show the hidden columns information. (end date and beginning date)

Help! :)

snoopy
 
In your after update set your textboxes to the columns of the combo box.

txtStart = yourcombobox.column(1)
txtEnd = yourcombobox.column(2)

The first column can always be obtained with yourcombobox.column(0)

Just referring to yourcombobox (without the column number) will return the BOUND column.
 
How are ya snoopy92211 . . . . .

Code:
[blue]   Me!TextBoxName1 = Me!LictBoxName.Column(1)
   Me!TextBoxName2 = Me!LictBoxName.Column(2)[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top