Results 1 to 4 of 4
  1. #1
    DFeil is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2012
    Posts
    18

    If and Then

    If the field M1TimeRemaining is blank then I get an error, is there a way using if and then functions to show "No Data" if the field is empty?



    Miscellaneous1: DateAdd("yyyy",[M1TimeRemaining],[InspectionDate])

    Thanks in advance.

    Dave

  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,652
    Try

    Miscellaneous1: IIf(IsDate([M1TimeRemaining]),DateAdd("yyyy",[M1TimeRemaining],[InspectionDate]), "NoData")

    Though of course that gives you a mix of numbers and text, but if it's just informational it should work.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    DFeil is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2012
    Posts
    18
    That's perfect, you rock!

  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,652
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

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