Access 2003
Hi.
I'm trying to loop through all of the selected records in a multiselect listbox and return their email addresses separated by a semi-colon - but i'm not getting the right results.
Any ideas please guys?
Hi.
I'm trying to loop through all of the selected records in a multiselect listbox and return their email addresses separated by a semi-colon - but i'm not getting the right results.
Code:
If MsgBox(strMessage, vbYesNo) = vbYes Then
intRow = 0
Do
If Me.lstInvites.Selected(intRow) = True Then
If intRow > 0 Then
strEmail = strEmail & " ;"
End If
Me.lstInvites.Selected(intRow) = True
strEmail = strEmail & Me.lstInvites.Column(3)
End If
intRow = intRow + 1
MsgBox strEmail
Loop Until intRow = intTotal
DoCmd.OpenForm strForm, , , , , , strEmail
End If
Any ideas please guys?