Results 1 to 3 of 3
  1. #1
    Holli is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    46

    Adding a 3rd condition in IIf(IsNull expression

    I have no idea how to do this. I have been asked to add another condition to my IIf(IsNull expression



    Code:
    =IIf((IsNull([Coding Errors])) And (IsNull([MM Changes after WF])),"","Field Required")
    Thanks Joe M. works great.

    My task now is to add the Notes textbox to the condition and if Notes are present then the message will read Notes are present in blue


    Any direction would be of great help.

    Thanks

    Holli

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    IIF statement is for a query,
    this is on a form, so I would remove the IIF and use this code in an event:

    Code:
    public sub TestFlds()
        if IsNull([Coding Errors]) And IsNull([MM Changes after WF]) then
                txtBox = ""  
        else
               txtBox = "Field Required"
        end if 
    end sub

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    This is an expression in Conditional Formatting?

    If you want to change text or back color, need to use Conditional Formatting.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Adding Value to a field when condition is met
    By Gabynex9 in forum Access
    Replies: 14
    Last Post: 05-21-2015, 08:21 PM
  2. Replies: 4
    Last Post: 10-16-2013, 01:05 PM
  3. Replies: 1
    Last Post: 07-21-2013, 09:40 PM
  4. Replies: 1
    Last Post: 11-04-2010, 12:57 PM
  5. Query using IIf(IsNull) expression
    By jmartin in forum Queries
    Replies: 3
    Last Post: 12-18-2009, 04:19 PM

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