Hyperlinks

tiggy

Registered User.
Local time
Today, 12:55
Joined
Oct 25, 2003
Messages
29
Good Morning (UK)

I know that if I have an email field on a table and make it a hyperlink I can when I enter details in the table type in mailto: followed by the email address it will, when clicked, open up a new message box in outlook with the send too box completed.

My question is this, how can I tell the field that it should already know the mailto: bit and the user has only to type in the email address as normal.

Sorry if this is badly worded

Tiggy
 
The problem is, unless u specify the mailto: then access assumes it's a web address. So if u enter:
me@here.com
Access actually enters:
me@here.com#http://me@here.com#

The format being
displaytext#address#subaddress#screentip

So to get around this u could do something liek this:
Code:
Private Sub myEmail_AfterUpdate()
    myEmail = Replace(myEmail, "http://", "mailto:")
End Sub
That should give u a valid email address.

Alternatively, u could do something like this:
Code:
Private Sub myEmail_Click()
    If IsNull(myEmail) Then
        DoCmd.RunCommand acCmdInsertHyperlink
    End If
End Sub
So whenever u click in the email field (and it's empty) it will open the insert hyperlink dialog. Unfortunately, i don't think there's a way to jump to the email part of the dialog.

Hope that helps,
Dave
 
Thank you

I shall give that a shot

Tig
 

Users who are viewing this thread

Back
Top Bottom