Hyperlink Help

N

Novice2000

Hi,

I have created a form which has the customer demographics. One of the fields
is for their email address. In properties under format is a line that syas
"hyperlink", yes or no. If I select yes, the email seems to be displayed as a
hyperlink which I assumed would open an email form. However, though it looks
like a link, it doesn't seem to do anything.

What can I do to get this email address hyperlink to work when clicked?
 
D

Daniel

hyperlink is a general term and there are numerous prefixes that basically
inform the app as to which type of hyperlink it is dealing with and thus what
to do with it.

ie:
http:// -- web address
mailto:// -- email address
etc.

So for the computer (db) to respond appropriatly to your email address you
need to ensure the prefix is present. Typically, I do not make the mailto://
prefix appear to the user, they simple enter the email address as they know
it ([email protected]). I then use the click even to use the

Application.FollowHyperlink "mailto://" & Me.EmailAddressControl Name

The hyperlink will also work, but the prefix must be present.
 
N

Novice2000

Thank you

So, do I write this as a Macro that runs on "Click"? Not knowing much about
Macros ro much else, would it be RunApp and then what exactly goes into the
Command Line?
 
D

Daniel

Your going to need to do some minor VBA programming.

Setup your table and thus your form so the users input the email adddress
normally. Then right-click on the email address control and open the
properties dialog. Goto the event tab and select the DoubleClick event and
press the ... at the right-hand side of the control. Select to add code. it
should launch you into the VBE editor in the doubleclick event for that
control.

Enter something like

Application.FollowHyperlink "mailto://" & Me.EmailAddressControl Name

Replace the Me.EmailAddressControl Name with the name of your control. Then
exist the VBE Editor, close the form (save the changes). open the form
select a record with an email entry and double-click it. It should open your
default email app and address a new email to the address.

I used the 2x click event rather than the onclick event so that the user can
still click on the control to edit it without always creating an email. they
have to intentionally 2x click to do that.

--
Hope this helps,

Daniel P
 

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