Mailto hyperlink

S

Strider712

The following code works ok when entering the email address first time,
however when the field is updated i.e. new address or correction is
made ot rejects the update and returns to the original entry. Can
anyone help please?

Private Sub txtHomeEmail_AfterUpdate()

'Automatically enters the hyperlink entered by the user as a mailto
protocol

If Len(Me![HomeEmail]) = 0 Then Exit Sub
Me![HomeEmail] = "#mailto:" & Left(Me![HomeEmail], InStr(1,
Me![HomeEmail], "#") - 1) & "#"

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top