Results 1 to 4 of 4
  1. #1
    zambrij is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    2

    Adding cc: to a report using iif and multiple criteria

    Hello – Here is an IIf statement I am currently using to add a cc: to a report/letter only if that addressee (O) is not blank:

    =IIf([O-LastName] Is Null," ",Trim("cc: " & [O-Prefix] & " " & [O-FirstName] & " " & [O-LastName] & " " & [O-Suffix] & ", " & [O-Company]))



    I’d like to also have the letter cc: stay blank if another condition is true - it is a yes/no check box labeled “O-D Same” So if “O-LastName” is blank, leave the cc: blank, but also if the “O-D Same” box is checked (yes/true), leave the cc: blank. How do I add this? Thank you!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    =IIf([O-LastName] Is Null OR [O-D Same] = True,...
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    zambrij is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    2
    Thank you! That works

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help, and welcome to the site by the way!

    In the long run you'll find that the spaces and symbols in your object names aren't worth the trouble.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Help with adding criteria
    By aubtiger14 in forum Queries
    Replies: 5
    Last Post: 12-05-2013, 10:39 AM
  2. Replies: 1
    Last Post: 08-06-2013, 07:52 PM
  3. Replies: 7
    Last Post: 06-28-2013, 12:15 PM
  4. Replies: 1
    Last Post: 07-13-2011, 11:00 AM
  5. Replies: 0
    Last Post: 02-28-2011, 09:46 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums