By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,398 Members | 1,362 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,398 IT Pros & Developers. It's quick & easy.

select the 1st row in a listbox

P: n/a
How can i select the first row in a list box, after pressing the TAB key
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Parintas Themis STE Kardias wrote:
How can i select the first row in a list box, after pressing the TAB key


Does pressing the 'arrow down' key work?

--
Super Mike
"Mi asno querría un enano y un yate, por favor."
[My donkey would like a midget and a yacht, please.]
Nov 13 '05 #2

P: n/a
Parintas Themis STE Kardias wrote:
How can i select the first row in a list box, after pressing the TAB key

I put into the OnGetFocus
If Me.ListBox.ListIndex = -1 Then Me.ListBox.Selected(0) = True
and that works. If you use column heading enter
If Me.ListBox.ListIndex = -1 Then Me.ListBox.Selected(1) = True

The reason I check for the value of ListIndex is that if I return to the
listbox I don't want to change back from a prior setting made by the user.
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.