Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2007
    Location
    Ohio
    Posts
    11

    IsNull question

    I have a report that has text fields displaying data linked to a query field. I need to add an IsNull expression into the report text field that will display the message "no record" if the field turns up blank. Currently, the text field contains the following query name/field reference:


    ODADAS (Recent)_MaxOfValidThru

    This turns out the data I need, but when no data is found I want it say "no record". Thanks in advance.

  2. #2
    jya is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2007
    Location
    Chicagoland
    Posts
    109

    Something you could try...

    In your query, one of your columns could be an expression that uses an IIF statement

    Expr: IIF(IsNull([fieldname],"no record",[fieldname])

    Of course, you need to make sure that the report text field references the column name.

  3. #3
    Join Date
    Dec 2007
    Location
    Ohio
    Posts
    11
    How do I do this? Right now my field reference is: ODADAS (Recent)_MaxOfValidThru. How do I place the if statement using the field reference? Thank you for your help.

  4. #4
    jya is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2007
    Location
    Chicagoland
    Posts
    109
    I am assuming that you have a fieldname called 'ODADAS (Recent)_MaxOfValidThru'. If so, replace it with this expression

    IIF(IsNull([ODADAS (Recent)_MaxOfValidThru]),"no record",[ODADAS (Recent)_MaxOfValidThru])

  5. #5
    Join Date
    Dec 2007
    Location
    Ohio
    Posts
    11
    Thank you so much.

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