Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email - getting rid of the extra in To:

Status
Not open for further replies.

torb123

IS-IT--Management
Jan 20, 2005
22
US
I have a form that sends an invoice via email to a customer. To get the To: line I use a D-Lookup, but since the field is a hyperlink, it puts unnecessarytext in the To: Line.

My D-Lookup is: .To = DLookup("[Contact1Email]", "Customers", "[CustomerID]=[Forms]![Orders]![CustomerID]")

It puts in the To: line in this format: address@domain.com#mailto://address@domain.com#

As you can see I don't need any of the text between the # signs. Is there a way to just get the DLookup to take the text out of the field rather than the text and link, or to get it to delete the pound signs and everything inbetween?

Thanks
 
Take a look at the HyperlinkPart method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
That did it, thanks. My new code is:
.To = HyperlinkPart(DLookup("[Contact1Email]", "Customers", "[CustomerID]=[Forms]![Orders]![CustomerID]"), acDisplayedValue)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top