Right, a very easy way to do this...
Set a field on your table as follows:
Field Name = Email_Address
Data Type = Test
Description = Email Address
In a Form Design View
---------------------
[ol]
[li]On a form insert a text box linking to the field
Email_Address and have it visible[/li]
[li]Press F4 TO open the properties menu[/li]
[li]Select the OTHER tab[/li]
[li]In the NAME item, type:
Address_Testbox[/li]
[li]Press F4 to remove the properties menu[/li]
[li]Click on
insert then on
Hyperlink[/li]
[li]When the box pops up, click on
Email Address on the right and press the space bar once in the address field.[/li]
[li]Press OK[/li]
[li]You will now have a label with blue underlines text
mailto: [/li]
[li]Make the label longer, to accomodate long email addresses[/li]
[li]Set it's NAME to
Address_Link (see (2) above on how to do this)[/li]
[li]press F4 to open the properties menu[/li]
[li]from the drop down menu, select
FORM[/li]
[li]click on the
Event Tab[/li]
[li]click in the
On Current item and to the right, you will see
... - Click on it[/li]
[li]Select
Code Builder[/li]
[li]type the following between
Private Sub Form_Current() and
End Sub:[/li]
[/ol]
Code:
If Me.Address_Textbox.Value = "" Or IsNull(Me.Address_Textbox.Value) = True Then
Me.Address_Link.Caption = ""
Me.Address_Link.HyperlinkAddress = ""
Else
Me.Address_Link.HyperlinkAddress = "mailto:" & Me.Address_Textbox.Value
Me.Address_Link.Caption = Me.Address_Textbox.Value
End If
Now, when you view the form in form view, you will have the text box so you can alter the email address and a link so you can send an email to the email address.
If you don't want the email address to be visible in the text box, change to design view, press F4, Select
Address_Textbox from the drop down menu and on the Format tab, set
Visible to
NO
Hope this helps
Aubs