List Box

K

Klatuu

Forms!MyFormName!MyListBoxName.Selected(0) = True
Will select the first row in the list box.
 
J

John Vinson

How do i select a specific listbox value using code?

By specifying its name:

Me!lstMyListbox

or

Dim strControlName as String
....
strControlName = "lstMyListbox"
....

then do something with Me.Controls(strControlName).

John W. Vinson[MVP]
 
Top