List Box Question

  • Thread starter Thread starter Gina Whipp
  • Start date Start date
G

Gina Whipp

I know I can set this as the Default Value in a Combo Box...
[Form].[CategoryID].[ItemData](0)

Is there anything I can set to force the first item in a list box to be
'selected' On Open?

Thanks in advance...
Gina Whipp
 
Hi Glenn,

That's not working, thanks anyway.

Gina Whipp


Glenn said:
Me.ListName.Selected(0) = True

-----Original Message-----
I know I can set this as the Default Value in a Combo Box...
[Form].[CategoryID].[ItemData](0)

Is there anything I can set to force the first item in a list box to be
'selected' On Open?

Thanks in advance...
Gina Whipp


.
 
Ok, I'm slow it works on the On Open Property of the form not on the Default
Value in the Property window.... BIG THANKS!

Glenn said:
Me.ListName.Selected(0) = True

-----Original Message-----
I know I can set this as the Default Value in a Combo Box...
[Form].[CategoryID].[ItemData](0)

Is there anything I can set to force the first item in a list box to be
'selected' On Open?

Thanks in advance...
Gina Whipp


.
 
I know I can set this as the Default Value in a Combo Box...
[Form].[CategoryID].[ItemData](0)

Is there anything I can set to force the first item in a list box to be
'selected' On Open?

Try something like:

Me.List1.Value = Me.List1.ItemData(Abs(Me.List1.ColumnHeads))

Note that you will need to replace "List1" with the name of your listbox. The
use of the "ColumnHeads" property ensures that the code will work properly
whether the listbox's "ColumnHeads" property is set to "Yes" or "No".
 
Back
Top