Problems with Conditional Formatting

nickaccess

Registered User.
Local time
Today, 23:11
Joined
Jul 27, 2017
Messages
43
Todays test, here goes

I am trying to get my format to say if the field is empty (no date) I want you to show the word Invalid. I can get the colour to come up but not the word. At the moment it looks like this.

Expression is IsNull([DATEAPVAL])=True

At the moment the colour is BLUE and that is fine but I want the word to appear if no date is present in the field DATEAPVAL.

Thank you everyone as always, remember this old dog IS learning new tricks with the help of this group.:D
 
Yours should work but try this instead:

Code:
Expression Is Nz([DATEAPVAL],"")=""

In either case, the CF may not work in all form views UNLESS you click on the field
 
Yours should work but try this instead:

Code:
Expression Is Nz([DATEAPVAL],"")=""
In either case, the CF may not work in all form views UNLESS you click on the field

Sorry, another one that will not work. Once I can do screen shots etc maybe that will help. Thank you again.:(
 
I tried both versions & they worked for me in datasheet view
However in Form View both worked ONLY if I clicked on them

By comparison, this kind of thing works fine in Form view:

attachment.php


You can also see the field with blanks that I used to test earlier
 

Attachments

  • Capture.jpg
    Capture.jpg
    96.5 KB · Views: 381
I tried both versions & they worked for me in datasheet view
However in Form View both worked ONLY if I clicked on them

By comparison, this kind of thing works fine in Form view:

attachment.php


You can also see the field with blanks that I used to test earlier

System has now crashed hahaha, just my luck. Will try next week. Thank you as always. Nick :o
 
System has now crashed hahaha, just my luck. Will try next week. Thank you as always. Nick :o

I have looked again today. I can get the field to colour blue but I still cannot get it to read INVALID if the field is empty. The Nz bit definitely does not work at all. I bet you guys are pulling your hair out hahaha.

Any other suggestions??? Apart from go away:rolleyes:
 
Easiest way to show text instead of a value is with the Format property of the control.

Code:
;;;"Invalid"

You can also set the foreground colour.
Code:
;;;"Invalid"[Red]

The semicolons delimit options for values that are Positive; Negative; Zero; Null
 
Easiest way to show text instead of a value is with the Format property of the control.

Code:
;;;"Invalid"
You can also set the foreground colour.
Code:
;;;"Invalid"[Red]
The semicolons delimit options for values that are Positive; Negative; Zero; Null

Sorry I think I am thick as two short planks. No matter what I am doing it will not work.

The expression is looking for a date, if the date is blank I want it to say invalid. At the moment it shows;

IsNull([DATEAPVAL])=TRUE

This just shows it as blue, that is the colour I have chosen in the settings to show. All I want it for it to show, if the date is not there, show the word INVALID and colour it blue.

I am not that brainy when it comes to Access as I have taught myself. riggers has been brilliant, but I think I am the one not understanding you very talented guys. :confused:
 
You need to apply Galaxioms code in the format property of the control in the form;
attachment.php


Do that and your conditional formatting to get what you want.
 

Attachments

  • Blank_Date_Format.PNG
    Blank_Date_Format.PNG
    7.6 KB · Views: 325
You need to apply Galaxioms code in the format property of the control in the form;
attachment.php


Do that and your conditional formatting to get what you want.

THANK YOU, this has work, I have now learned something new today. Thanks to EVERYONE and thanks for your patience with this slow learner. You can teach an old dog new tricks.:D:D:D:D:D:D:D:D
 
Easiest way to show text instead of a value is with the Format property of the control.

Code:
;;;"Invalid"

You can also set the foreground colour.
Code:
;;;"Invalid"[Red]

The semicolons delimit options for values that are Positive; Negative; Zero; Null

Thanks for that Greg. Something new learned for me as well
 
ridders, thank you as well from me. I am learning all the time. "If you can learn one new thing every day, then your day has not been wasted".
 
You're welcome.

None of us here ever stop learning.
The site has many experienced & expert users of Access (etc) but absolutely nobody will ever know all there is to know about Access (if you see what I mean)
 

Users who are viewing this thread

Back
Top Bottom