Rachel Alldredge
asked on
Can I override the Runtime Error '94- Invalid use of NULL when sending emails from Access?
I have a macro set up to send out an email from Access. There are several variables within the email however not all of the variables will always have data populated. For example- a phone number with an extension. Not all phone numbers will have an extension as they may be a direct line.
How can I bypass this error and have the e-mail simply leave that section blank if there is no data to populate?
How can I bypass this error and have the e-mail simply leave that section blank if there is no data to populate?
Invalid use of NULL
One way , although not tried from my side.If fields come from tables, try to make it pull from a query on those tables. Make the query fields as Nz(field).
Select Nz(fld1) as fld1, Nz(fld2) As fld2, ....
This way you preserve most of coding, including field names.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
nz([phone],"")