focus of a listbox

  • Thread starter Thread starter marco van haaften
  • Start date Start date
M

marco van haaften

How do I set the focus to a record in a listbox.

I have a listbox with items with a unique id. Given that I
have the id, how can set the focus to the particular
record in the listbox.

Just a tip would be usefull, thanks!!
 
marco van haaften said:
How do I set the focus to a record in a listbox.

I have a listbox with items with a unique id. Given that I
have the id, how can set the focus to the particular
record in the listbox.

Just a tip would be usefull, thanks!!

Use the Selected property. For example, this selects the first item in a
list:

Me!Listbox.Selected(0) = True

The Selected property uses the row index.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top