Selecting all items in a listbox

HandSam

Registered User.
Local time
Today, 09:15
Joined
May 18, 2012
Messages
48
I am using Access 2007. I have a multi select list box that has all mail addresses from a query. The code I have sends mails to only members who are selected from the listbox. I want it to send to everyone. I need code that can select all items in a list box. I tried
set lst=me![maillistbox]
call selectAll(lst)

'but it didnt work. Please help
 
I was able to make it work using the following code:
Dim rowcount As Long
Set lst = Me!
[List68]

For rowcount = 0 To lst.ListCount - 1
lst.Selected(rowcount) = True
Next
 

Users who are viewing this thread

Back
Top Bottom