Thanks - Ive seen this already (spent ages on Google), I cant seem to get it to work which is why I asked here...
My first problem is "Argument no optional" on the Call SelectAll line.
Thanks Rainman.
When I run the code with that bit done i get a debug on the row "SelectAll = True" saying compile error on left side of assignment must return varient or object.
Do you know what that means?
Thanks
Public Function LstSelectAll(Lst As ListBox) As Boolean
Dim Row As Long
If Lst.MultiSelect Then
For lngRow = 0 To Lst.ListCount - 1
Lst.Selected(Row) = True
Next
SelectAll = True
End If
End Function
Of course! I change the name - Access didnt like it for some reason.
OK guys... almost there. I naw have it running, but its only selecting 1 item from the list instead of all items. What else have I done wrong? LOL
Thanks
Public Function LstSelectAll(Lst As ListBox) As Boolean
Dim Row As Long
If Lst.MultiSelect Then
For lngRow = 0 To Lst.ListCount - 1
Lst.Selected(Row) = True
Next
LstSelectAll = True
End If
End Function