By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,660 Members | 1,082 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,660 IT Pros & Developers. It's quick & easy.

How to ignore caption and it's field in an Access 2010 Report and an Outlook Email wh

P: 1
I am not too familiar with VBA in Access, but I would like if someone could show me how to ignore a caption and it's field in an Access 2010 Report and an Outlook Email when the field value is it is empty.

'Here is some relevant code (next three lines):

Expand|Select|Wrap|Line Numbers
  1. Dim DesiredRequiredDate As String
  2. DesiredRequiredDate = Me!DesiredRequiredDate
  3. "Desired Required Date:" & " " & DesiredRequiredDate
'In the body of email, if the value is null/empty, then I do not want the field name to appear in the body of the email, ignored.
Oct 23 '12 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,324
Please use code tags when posting code.

Use the If Then logic to skip blank fields
Expand|Select|Wrap|Line Numbers
  1. If someValue <> "" And Not IsNull(someValue) Then
  2.    'output your data
  3. End If
Oct 23 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.