Default selection in list box

Bogzla

Registered User.
Local time
Today, 19:24
Joined
May 30, 2006
Messages
55
So I have a list box on a form from which users can select which fields to display in a query... There is a default set of fields to display, which at the moment is hardcoded in the associated VBA (far from ideal). I was wandering if there is a specific way to open a list box with a number of values selected by default?

Many thanks in advance,
Bogzla
 
I'm not sure how you are doing it now - but I use the below to auto select all the items which have >0 in column 3. You just have to figure out somehow on each line of the listbox whether you want it auto selected or not and if yes

.Selected(wCount) = True


For wCount = 0 To .ListCount - 1
'''Select all to merge

If .Column(3, wCount) > 0 Then .Selected(wCount) = True


Next wCount
 

Users who are viewing this thread

Back
Top Bottom