Copy selected list box value and paste it to a txtbox

  • Thread starter Thread starter shiro
  • Start date Start date
S

shiro

Hi all,
I have 1 listbox,1cmdButton and 1 txtBox in my form.
I want every time the user click the cmdButton,the selected
listbox value is added to the txtBox,if the user click it
more than once,the value in the txtBox separated by * ; *.
How to do that?

Thank's

Shiro
 
Hi Shiro,

Put your code in the onClick event of the command button.

If Len(Nz(Me!txtBox.Value)) > 0 Then
Me!txtBox.Value = Me!txtBox.Value & "* ; *" & Me!ListBox.Value
Else
Me!txtBox.Value = Me!ListBox.Value
End If

Hope this helps...
Gordon
 
Back
Top