concatenate string using loop

Nengster

New member
Local time
Yesterday, 23:03
Joined
Jan 28, 2009
Messages
5
Hi, I'm trying to concatenate an email string using a loop function however it does not seem to work. Here is my code. Does anyone seem to have a solution to this problem.

Dim emaddr
Dim emaddrapp

strForm = "frmMailer"
strSelect = "Select"

'initialise string

emaddr = Empty

Do While Not Forms(strForm).Form.NewRecord

If Forms(strForm)(strSelect) = True Then

emaddrapp = EmailName.Value & ";"
emaddr = emaddr & emaddrapp
DoCmd.GoToRecord , , acNext

Else
DoCmd.GoToRecord , , acNext


End If

Loop

hlink = "mailto:" & emaddr & "?"

Application.FollowHyperlink hlink

End Sub
 
You need to be more explicit. How is it not working? Is it sitting there apparently doing nothing? Does it give you an error message? If so, what does the error message say? Details, please.
 

Users who are viewing this thread

Back
Top Bottom