Listbox Default Record

  • Thread starter Thread starter Craig
  • Start date Start date
C

Craig

I think I figured out the issue from my previous posting.
I have the Multi-select turned on in the second listbox
and for some reason you can't set a default record in a
listbox when that is the case.

Or can you? Is it possible to have a user open a form and
the listbox on the form to default (highlight) to the
first record, when the listbox is set to 'Multi-select'?

Thx again for any help.

C
 
Craig said:
I think I figured out the issue from my previous posting.
I have the Multi-select turned on in the second listbox
and for some reason you can't set a default record in a
listbox when that is the case.

Or can you? Is it possible to have a user open a form and
the listbox on the form to default (highlight) to the
first record, when the listbox is set to 'Multi-select'?

A multiselect list box doesn't have a Value property. You can still
select the first item in the list box, using this code:

Me!Listbox2Name.Selected(0) = True
 
Thanks, Dirk.

Craig
-----Original Message-----


A multiselect list box doesn't have a Value property. You can still
select the first item in the list box, using this code:

Me!Listbox2Name.Selected(0) = True

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.
 
Back
Top