On Wed, 10 Sep 2003 10:28:44 -0400, "Jim Fox" <ji****@charter mi.net> wrote:
Thought maybe I could do this with a hyperlink field in a
table......... ..but doesn't seem to be working. I basically got a vendors
table with all the contact info. One of the fields is EMAIL (for the email
address of the contact). Basically I want people to be able to click on the
email address or field and have their default mail program pop up with that
address in it.
How can I do this? Am I thinnk to hard about this and should just make it a
text field?
THANK
Jim
Forget about using Hyperlink fields in your table, it is more trouble than it is worth. Store the email addresses in a standard text field.
On your form place a small command button (cmdEmail) next to your email address control (txtEmail).
On the form's OnCurrent event and the AfterUpdate event of the email address control put something like -
If Not IsNull(Me.txtEm ail) Then
Me.cmdEmail.Hyp erlinkAddress = "MailTo:" & Me.txtEmail
Me.cmdEmail.Ena bled = True
Else
Me.cmdEmail.Ena bled = False
End If
If the current record has an email address entered, the command button will be enabled with it's HyperlinkAddres s set to the current email address.
Clicking the button will open your default mail client to a new email with the address entered.
Wayne Gillespie
Gosford NSW Australia