Results 1 to 12 of 12
  1. #1
    FrustratedAlso is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    35

    Question Problem with conditonal formatting


    I have a reports with fields for weight, height, width diameter, and depth (all database fields). I have these fields conditionally set to highlight the field if it is null
    Code:
    Expression is IsNull([fieldname])
    . all the fields work properly except height. Anyone else had this problem? Solution?

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,930
    is height actually null? Perhaps it defaults to 0?

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I do not understand what you are trying to accomplish but, FYI IsNull is a function and returns a value. It is a triple state Boolean that is returned. However, if it returns Null, it is because your argument is not a valid expression. Otherwise, the IsNull() function will return True or False.

  4. #4
    FrustratedAlso is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    35

    Yes, it us null

    Quote Originally Posted by Ajax View Post
    is height actually null? Perhaps it defaults to 0?
    It is null, weight, width diameter and depth all function properly.

  5. #5
    FrustratedAlso is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    35
    Quote Originally Posted by ItsMe View Post
    I do not understand what you are trying to accomplish but, FYI IsNull is a function and returns a value. It is a triple state Boolean that is returned. However, if it returns Null, it is because your argument is not a valid expression. Otherwise, the IsNull() function will return True or False.
    I understand what IsNull does and how it functions, it does the job for the weight, width diameter and depth fields. It is only the height field that does not produce the results.

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Perhaps you are using the intrinsic conditional formatting and then deleted the control bound to your Height field. Replacing the control with a new one may not employ the conditional formatting. A similar thing may happen if you are using formatting in the VBA module and do not rebuild the Sub Procedure.

  7. #7
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,930
    height is a reserved word, have you tried changing the name? (looks like your other fields do not use reserved words)

    have you tried ... expression is... isnull([fieldname])=true

    I presume you have changed 'fieldname' to 'height'

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by Ajax View Post
    ...height is a reserved word, have you tried changing the name?...
    That was throwing me off when I was trying to understand post #1. I think the brackets should manage the reserved word thing though?? Testing with another name would be a good idea, don't get me wrong.

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I have encountered a situation where even bracketing a reserved word name did not help - weird and unexpected. I HAD to change the fieldname (or create an alias name in query and use that - memory a little fuzzy on exactly what I did).
    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.

  10. #10
    FrustratedAlso is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    35

    Red face That is the Answer

    Quote Originally Posted by June7 View Post
    I have encountered a situation where even bracketing a reserved word name did not help - weird and unexpected. I HAD to change the fieldname (or create an alias name in query and use that - memory a little fuzzy on exactly what I did).
    Changing the field name on properties for the field worked. changed field name to Hgt and left the field source height.

  11. #11
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    So it was the name of the control that threw the wrench in the works?

  12. #12
    FrustratedAlso is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    35

    Yes it was

    Quote Originally Posted by ItsMe View Post
    So it was the name of the control that threw the wrench in the works?
    Yes it was, filed under "things that make no sense"

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

Similar Threads

  1. Conditional Formatting Problem
    By baileysw in forum Access
    Replies: 2
    Last Post: 11-21-2012, 06:23 PM
  2. Problem formatting chart data table
    By smartin in forum Reports
    Replies: 8
    Last Post: 09-22-2012, 05:54 PM
  3. Problem with page formatting on form
    By robertmarkdudley95 in forum Forms
    Replies: 1
    Last Post: 03-30-2012, 03:05 AM
  4. Formatting dates problem
    By ruthib4 in forum Programming
    Replies: 16
    Last Post: 02-25-2012, 12:49 AM
  5. Conditional Formatting Problem
    By DanKoz in forum Access
    Replies: 6
    Last Post: 10-23-2011, 12:57 AM

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