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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Value from List Box and show in textbox and update table

Status
Not open for further replies.

LysaTigger

Technical User
Jan 28, 2005
12
0
0
CA
Description
I want to select a value from a list box and "on click" of a button I want to see the selected value in the text box. I then want the values in the text box to update my table.
The reason I want this design is because I have to select multiple values from the list box and I want to see which values I select in the text box so I can add or remove values in the text box in the future.

Unfortunately I am not really knowledgeable in VBA thus I was wondering if someone had already done this design and would not mind sharing the code.

thanks,
Lysa
 
Hi

Not sure that a table design where one column contains "n" values is a good idea, but... if you insist

How about

Bind the text box control to the table

in the after update event of the list box

MyTextBox = MyTextBox & MyListBox

or if you want a space between items

MyTextBox = MyTextBox & " " & MyListBox

But I repeat such a design is probably not sound

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top