Sending object with Null Field

Novice1

Registered User.
Local time
Today, 14:00
Joined
Mar 9, 2004
Messages
385
I'm sending out an e-mail (see below). I want to add a cc addressee. However, sometimes the cc addressee will be blank. The e-mail works if the cc addressee field has data. It doesn't work if there isn't data. I tried an IIF statement but that didn't work. How do I can the object to work if the field is blank (null) or has data? Thanks


DoCmd.SendObject acSendNoObject, , acFormatTXT, Me.POCEmail, , Me.Email, , "Decoration Issue - Resolution Assistance", "Sir/Ma'am," & vbCr & vbCr & _
"We need your assistance in resolving the following decoration issue:" & vbCr & vbCr & _
"Issue/Necessary Correction: " & Me.Issue & vbCr & vbCr & _
"Member Information " & vbCr & vbCr & _
" " & Me.Grade & " " & Me.FullName & vbCr & _
" SSN: " & Format([SSN], "000-00-0000") & vbCr & _
" Unit: " & Me.Unit & vbCr & _
" E-mail: " & Me.Email & vbCr & vbCr & _
"Actions Taken:" & vbCr & vbCr & _
Me.ActionTaken & vbCr & vbCr & _
"vr" & vbCr & vbCr & vbCr & _
Me.TechTitle & " " & Me.FirstName & " " & Me.LastName & ", Cntr" & vbCr & _
"Awards and Decorations" & vbCr & _
"DSN 460-1633, Comm (229) 257-1633", True
 
The Nz() function is what you want. Nz being Null to Zero.

Nz([Your CC Field])
 

Users who are viewing this thread

Back
Top Bottom