My Assistant
![]() ![]() |
|
|
Feb 19 2007, 03:29 PM
Post
#1
|
|
|
UtterAccess Addict Posts: 239 From: Rochester, NY |
I have created an unbound simple listbox (multiselect) for users. When they open the form I would like the first two options (rows) to already be selected in the listbox (that is, they are both highlighted). I tried using the default value control but couldn't get it to work. I'm sure it's fairly simple. Any ideas? Thanks!
|
|
|
|
Feb 19 2007, 03:56 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 17,610 From: Don Mills, ON (Canada) |
You can't do it using default values.
In the form's Load event, put logic to toggle the Selected collection: CODE Private Sub Form_Load() Me!MyListbox.Selected(0) = True Me!MyListbox.Selected(1) = True End Sub (Note that numbering starts at 0, not 1) |
|
|
|
Feb 19 2007, 04:01 PM
Post
#3
|
|
|
UtterAccess Addict Posts: 239 From: Rochester, NY |
Beautiful. I knew it would be easy. Thanks so much! W~
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th May 2013 - 09:53 AM |