format an Email address from DB

drazen

Registered User.
Local time
Today, 19:38
Joined
Jan 28, 2016
Messages
31
Hi, I am constructing a reminder email facility on my db, and I am filtering my db and emailing all the clients direct from access. I think I have it all sorted except the email I am getting from the table is strange.

in the 'to' box i am getting

client@clientemail/co/uk#mailto:client@clientemail/co/uk#

where I want

client@clientsemail/co/uk

(i have changed the . with / as it keeps turning this message into links)

this is the code that picked the Email and sends it
Code:
Dim tempEmail
rs.MoveFirst
    Do Until rs.EOF = True
        tempEmail = rs!email
        
        oMail.Subject = Subject
        oMail.Body = EmailBody
        oMail.To = tempEmail
        oMail.Display

        rs.MoveNext
    Loop

how do I remove the email in the hash tags?

I'm using Access 2010
thanks
 
You have hyperlink field.

You can use:

oMail.To=Split(tempEmail, "#")(0)

to get the first portion.
 
thanks for the fast reply. Thats works a dream :)
 
Youre welcome.
 

Users who are viewing this thread

Back
Top Bottom