View Single Post
  #3  
Old May 1st, 2005, 03:04 AM
Steve Schapel
external usenet poster
 
Posts: n/a
Default

Tlaker,

Do you mean that Access is literally inserting a "http://" string in
front of the data you are entering? I have not seen this before. As
you have suggested, you will get the behaviour you seek if the mailto
protocol identifier is used in your data. I would normally use code
like this on the afterupdate event of the control...
If Me.Email Like "mailto:*" Then
' do nothing
Else
Me.Email = "mailto:" & Me.Email
End If

But this assumes the code is just working with the text you entered. If
you literally have a http identifier there, try it like this...
If Me.Email Like "mailto:*" Then
' do nothing
ElseIf Me.Email Like "http*" Then
Me.Email = Replace(Me.Email,"http://","mailto:")
Else
Me.Email = "mailto:" & Me.Email
End If

--
Steve Schapel, Microsoft Access MVP


tlaker wrote:
when entering an e-mail address on my form, Access 2000 changes it so that it
links to a webpage. How can I replace the "http://" with "mailto:" after
update?