mustangcoupe
Technical User
Ok, I have the following code it emails fine.
BUT if the control is null then I want it to not create an email.
BUT it executes the code and creates the email as specified in the code with no address in the TO: box.(with stop msg in code I see it go to the exit sub line BUT it still creats the email as in the else statment...)
BUT if the control is null then I want it to not create an email.
BUT it executes the code and creates the email as specified in the code with no address in the TO: box.(with stop msg in code I see it go to the exit sub line BUT it still creats the email as in the else statment...)
Code:
Private Sub emailcontact_Click()
Dim hlk As Hyperlink
If IsNull(Me.contactemail) Then
Exit Sub
Else
Set hlk = emailcontact.Hyperlink
hlk.Address = "MailTo:" & Me.contactemail & "?subject=Retlif Job Number " & Forms!job_form.Jobnumber
MsgBox "This will create an email and put " & Me.contactemail & "in the" & vbCrLf & " TO: box YOU must open Outlook and Send Mail or your " & vbCrLf & " email may get placed in your Outbox and net get sent.", vbOKOnly, "Send E-mail TO: " & Me.contactemail
End If
End Sub