>Hi all.....
>
>Sorry for such a "simple" question!
>
>I'm allowing a user to right click on a field to pop up a drop down list to make a selection from.
>
>The list comes up blank. (when you click on the down arrow the proper data is there...ie I think rowsource and type are properly set) How do I get an initial value in the list?
>
(1) Set the BoundTo property to .T.
(2) Set the RowSource and RowSourceType for the List
(3) Set the BoundColumn to the correct column of the RowSource
(4) Set the ColumnCount and ColumnWidth to show on the form properly
(5) Set the ControlSource to something to hold the result and start value
(6) Set other properties such as IncrementalSearch and Sorted as desired
The ListBox will start up at the List item whose BoundColumn matches the start value of the ControlSource. The ControlSource does not have to be a field; you can use a variable or property for the ControlSource as long as you are certain that it is in scope whenever the ListBox is active - a member property of the parent (or even of the Control) is generally preferable to a Private or Public memvar.