grobermatic
Technical User
Hi,
i'm using the following code to programatical;ly select a row in a listbox.
However when the list item is selected, the value of the listbox doesn't get set or changed.
I have setup a textbox next to the listbox with its controlsource set to =[lstpayments]. When selecting the listbox items with the pointer, the textbox reflects this change by showing the value of the listbox.
Any ideas on how to make this happen when manipulating the listbox programatically???
Many Thanks
Craig
--------------------------------------------------------------------------------------------------------
"Time-traveling is just too dangerous. Better that I devote myself to study the other great mystery of the universe: Women!" .. Dr E. Brown (1985)
i'm using the following code to programatical;ly select a row in a listbox.
Code:
Function SelectTop(frm As Form, listbox As String, Optional OnOff As Boolean)
Dim lngCounter As Long 'set up counter variable
For lngCounter = 0 To 1 [COLOR=green]'standard for/next loop[/color]
frm(listbox).Selected(lngCounter) = OnOff [COLOR=green]'sets the .selected property to the passed boolean parameter[/color]
Next lngCounter
End Function
However when the list item is selected, the value of the listbox doesn't get set or changed.
I have setup a textbox next to the listbox with its controlsource set to =[lstpayments]. When selecting the listbox items with the pointer, the textbox reflects this change by showing the value of the listbox.
Any ideas on how to make this happen when manipulating the listbox programatically???
Many Thanks
Craig
--------------------------------------------------------------------------------------------------------
"Time-traveling is just too dangerous. Better that I devote myself to study the other great mystery of the universe: Women!" .. Dr E. Brown (1985)