Conditional Formatting In Forms

TheRadioboy

Registered User.
Local time
Today, 22:49
Joined
Sep 27, 2017
Messages
20
Hello, please could you help me?

I have a split form and on the datasheet I am trying to format a date column called 'SCHEDULED' (this is the date a specific job will be scheduled for), I have used the expression:-

IsNull(SCHEDULED.Value)

To flag it as a red box if there's no date given, but I'd also like it to display the text 'NOT ASSIGNED'.

Could someone please tell me if it's possible to add that along with the red highlight?

Many thanks!
 
You can't easily put text into a bound date field.
If this is purely for display proposes and you don't need to edit the data, you could make a calculated field to display either the date or the text.

Code:
DisplayText: IIf([Scheduled] Is Null,"NOT ASSIGNED",[Scheduled])
 
Split forms are notoriously difficult to modify so many users including myself avoid them . For that reason I'm not sure if its possible.

However there is an emulated split form in sample databases which most users seem happy with. That should allow you to do what you want
However following reports of issues particularly in access 2007, it has since been updated and various versions are available in this thread

https://www.access-programmers.co.uk/forums/showthread.php?t=295803

Note that its an on going thread and you may have issues with one or more versions. If you do try any, do post any feedback to that thread.
 
Wonderful, thanks Minty.

Can I input that in the conditional formulating rule where it says 'Expression Is'?
 
Wonderful, thanks Minty.

Can I input that in the conditional formulating rule where it says 'Expression Is'?

Put it in the forms underlying query/recordsource. Then refer to the 'DisplayText' field instead of your scheduled date. You can still use the conditional formatting for the Red box

Expression is IsDate([DisplayText]) = True

As Ridders has said - split forms are very "touchy", and most of us end up avoiding them due to their limitations. You may be better with a proper subform made to look like a datasheet.
 
Thank you again for the help Minty, I am a newbie to this so it'll take me a bit of time to work out how to use a subform as a datasheet. Sorry if my answer seems a bit dim!
 
Not dim at all. It's all gobbledegook when you first start.
A sub form can be displayed as a datasheet. You'll just get a lot more design flexibility and usability by making a continuous form that looks like a datasheet.
 
Ah, I see.

Thank you for the tip - yes it's all a bit gobbledegook at the moment but I'm amazed just how powerful Access is!
 

Users who are viewing this thread

Back
Top Bottom