Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Formatting for NULL field

Status
Not open for further replies.

GingerR

MIS
Apr 17, 2001
3,134
US
Access 2k:
i have a subform (datasheet) where i want all but one field greyed out all the time so users see easily those fields are non-editable. one field always has a value in it, at least a 0 so the condit formatting is >=0 make it grey, so that works fine. two other fields tho are NULL (i've tested and i'm sure they are NULL) until filled in programmatically with user ID and date/time stamp. i cannot do any formula in the condit formatting that will make it grey. i've tried

=Null
<=&quot;zzzzzzz&quot; (user ID is 7 chars)
and even set the DEFAULT FORMATTING (This Format will be used if no conditions are met) to grey also. nothing works.

for date field i've tried also =Null and the Default Formatting, as well as <=12/31/2050 but again nothing works.

both UserID and Date/Time stamp fields will be grey if there is something in them, but they are white when they are null.

any suggestions?
 
Set the format using the following syntax to change the display:

0.00;-0.00;Zero;&quot;Null&quot;

This will tell the form how you want postive numbers, negative numbers, zero and null to be represented (displayed only not stored) in that order. You can also use conditional formatting (2nd item on the format menu).
 
hi there--thanks. but i'm lost as to what you are talking about. i put your code into the FORMAT property of my UserID field, it changed it to
Code:
0.00;-0.00;&quot;Zero;Null&quot;
then didnt do anything different when i opened the form.
there is no &quot;FORMAT&quot; property of the form itself.
you write &quot;You can also use conditional formatting (2nd item on the format menu). and that is my big issue--i am trying to make conditional formatting work for a field that is NULL. maybe i am just not understanding your help, sorry.
 
i figured it out.
i made the datasheet be all grey.
then set cond formatting for just the field i want white (>=0) it's alwasys got at least a 0 in it, so that works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top