Results 1 to 3 of 3
  1. #1
    caniread is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    86

    Nz null not working in report from a combobox

    In the control source on a text box in a report I put the following.
    =Nz([Forms]![Metrics Reporting]![cboareas],"All Areas")

    I want it to display the combo box selection but if none is selected I need it to say "All Areas"


    It displays the selection of the combo box but does not display "All Areas" when null.
    Any ideas why this is not working?

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    I suspect your combobox is not null but a zero length string. try

    =iif(Nz([Forms]![Metrics Reporting]![cboareas],"")="","All Areas",[Forms]![Metrics Reporting]![cboareas])

  3. #3
    caniread is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    86
    Eureka
    Thank you

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

Similar Threads

  1. Is Null Not working in access query
    By Japn in forum Access
    Replies: 13
    Last Post: 05-04-2015, 10:56 AM
  2. Working with queries and null values
    By guidout in forum Queries
    Replies: 6
    Last Post: 03-26-2015, 05:53 PM
  3. ComboBox, select null?
    By offie in forum Queries
    Replies: 2
    Last Post: 07-19-2013, 06:27 AM
  4. Set value of bound combobox to NULL
    By Kotoca in forum Forms
    Replies: 1
    Last Post: 06-30-2012, 02:27 PM
  5. IIF NULL not working
    By krutoigoga in forum Reports
    Replies: 6
    Last Post: 05-12-2010, 01:17 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