clicking on a field to send mail

J

Jean-Paul

In my table my email-adresses are stored like (e-mail address removed)

I stored it as a txt field...
Now I changed the fields property into "hyperlink"

When I navigate through the different records, the field-content is now
underlined and blue (which is correct)

Now I wrote:

Private Sub mailadres_Click()

SUBJECTBOX = "Mailing 4-parts"
MESSAGEBOX = ""
DoCmd.SendObject , , , "MAILTO:" & Me!mailadres, , , [SUBJECTBOX],
[MESSAGEBOX], -1
End Sub

My mail program opens and in the TO-screen I get:

MAILTO:[email protected]#http://[email protected]#

Which of course isn't correct...

What did I do wrong?
 
J

Jeff Boyce

Jean-Paul

The 'hyperlink' field type contains all those extra pieces (separated by
"#"s). Convert it back to "text" to start with.

Then add code to your control's "Click" event that sends (email) to the text
string in the control/field.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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