Sending Emails

S

Simon

I have a ordering system that will send an email to the customer
showing details of thiere order, this all works fine apart from when i
do not have a email address for the customer

What would be the code to make it only send the email if
me.EmailAddress has a email address in it



Thank

Simon
 
D

Douglas J. Steele

Presumably the e-mail address is Null when you don't have one. Check whether
it is, and only send the e-mail when it isn't.

Sorry, but that's as specific an answer as I can give, given how little
information you've given.
 
S

S.Dickson

Presumably the e-mail address is Null when you don't have one. Check whether
it is, and only send the e-mail when it isn't.

Sorry, but that's as specific an answer as I can give, given how little
information you've given.

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no private e-mails, please)







- Show quoted text -

Thank, the address field will be emply ( null)

thanks
 
A

Arvin Meyer MVP

Simon said:
I have a ordering system that will send an email to the customer
showing details of thiere order, this all works fine apart from when i
do not have a email address for the customer

What would be the code to make it only send the email if
me.EmailAddress has a email address in it

If Len(Me.EmailAddress & vbNullString) > 0 Then
' run your email code
End If
 
A

Armen Stein

If Len(Me.EmailAddress & vbNullString) > 0 Then
' run your email code
End If

Or...

If Me.EmailAddress & "" <> "" Then
' run your email code
End If

I find this shorter and easier to read, which is good because I'm not
as smart as Arvin. :) It handles both Null and Zero Length String,
just as Arvin's code does. Take your pick.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com
 

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