how to set focus on a item in a list box?

message from =?Utf-8?B?YWxla20=?= on 25 May 2004
Hi,
how can I set focus on list box, but the focus should be set on, for examle, first item in list box.

Thanx

alekm
 
Pieter Wijnen replied to =?Utf-8?B?YWxla20=?= on 25 May 2004
You can use code (form_Open/Current)

Me.ListBox1.Value=Me.ListBox1.ItemData(0)

HTH

Pieter

"alekm" <anonymous@discussions.microsoft.com> wrote in message
news:D4EEBC64-87BB-4EE4-AB8A-6AB2FBC162AD@microsoft.com...
examle, first item in list box.
 
anonymous replied to =?Utf-8?B?YWxla20=?= on 25 May 2004
set on, for examle, first item in list box.
you can use VB function ex: listbox.setfocus.

as for the first value, right click, go to properties and
look for the field "Default Value" type in taht box with
qoutes " type here" to what you want to appear as the
default value!

later
 

Archived message: how to set focus on a item in a list box? (Microsoft Access Forms)