neilgraham
New member
- Local time
- Today, 18:33
- Joined
- Sep 20, 2004
- Messages
- 7
I have an after update event on an email field set as a hyperlink. It has a default value of mailto: and a user enters the email address. The after update event is supposed to check that mailto: exists and if not to add it. However the fileds can end up with different contents as shown below based on what was in the field when the after update event fires.
#mailto:injtec@uol.com.br# is what is needed and works fine.
We can also get
#mailto:injtec@uol.com.br#http://injtec@uol.com.br##
Which still works but causes problems when later parsing ou the email address to put in the to field of an email.
I suspect it is the fs_HomeEmail = fs_HomeEmail that is doing something but have tried different methods with no success.
Private Sub fs_HomeEmail_AfterUpdate()
Dim EmlTxt As String
EmlTxt = "Mailto:"
If Left(fs_HomeEmail, 7) = "mailto:" Or Left(fs_HomeEmail, 8) = "#mailto:" Then
fs_HomeEmail = fs_HomeEmail
Else
fs_HomeEmail = "#" & EmlTxt & fs_HomeEmail & "#"
End If
End Sub
If i get a method to correct this is will still need to loop through al the email fields and strip out the extra code. Any help would be appreciated.
Regards
Neil
#mailto:injtec@uol.com.br# is what is needed and works fine.
We can also get
#mailto:injtec@uol.com.br#http://injtec@uol.com.br##
Which still works but causes problems when later parsing ou the email address to put in the to field of an email.
I suspect it is the fs_HomeEmail = fs_HomeEmail that is doing something but have tried different methods with no success.
Private Sub fs_HomeEmail_AfterUpdate()
Dim EmlTxt As String
EmlTxt = "Mailto:"
If Left(fs_HomeEmail, 7) = "mailto:" Or Left(fs_HomeEmail, 8) = "#mailto:" Then
fs_HomeEmail = fs_HomeEmail
Else
fs_HomeEmail = "#" & EmlTxt & fs_HomeEmail & "#"
End If
End Sub
If i get a method to correct this is will still need to loop through al the email fields and strip out the extra code. Any help would be appreciated.
Regards
Neil