Conditional formatting only works on mouse over

Graeme

New member
Local time
Today, 13:24
Joined
Oct 16, 2009
Messages
8
Hi All

Firstly, Happy New Year to all!

I wonder if you clever people could help a newbie like myself...?

I have a database used for tracking tickets - and in one of my open ticket views (which is a form with a datasheet subform) I have set conditional formatting to highlight the due date cell in red if the date is overdue.

Now at first this was working perfectly, but now for some reason when I open the form, the conditional formatting only appears if I move my mouse over it...

I am scratching my head here.

Would appreciate any help

Thanks

Graeme
 
Is the control showing "due date" on the main form or the subform.
 
Its on the subform in a datasheet view. The "due date" is a column
 
I don't know that it will work, but you could try:

Me.SubformControlName.Requery
or
Me.SubformControlName.Repaint

in the OnCurrent event of the main form.
 
Sorry I only just realised, its not in a subform, its in the detail section of the main form, just in datasheet view
 
By the way, I have tried repainting and requerying on load and on current and still no joy... :-(
 
Here are some screenshots. There are actually two fields which have conditional formatting - "Due Date" and "Category"
 

Attachments

Sorry to spam with messages, just figuring things out as I go. Just noticed that whenever this conditional format issue happens - the bottom left of the Access application main window shows "calculating..." like its stuck in some loop....
 
Well... it looks like its a flaw in Access when conditional formatting is used on a calculated field. My "Due Date" field is based on Date Raised +7 days. Found this on a website allenbrowne.com/bug-05.html

Flaws in Microsoft Access
Provided by Allen Browne, January 2004. Updated February 2007.
Conditional formatting

If you apply conditional formatting to calculated controls, you may start an endless loop where the form recalculates continually and fails to display the results. This happens in Access 2000, and 2002. It also occurs in Access 2003 if Service Pack 1 has not been applied.
Demonstration

Access Flaws.Zip contains a form named Dates. It demonstrates the problem with just two text boxes: TheDate bound to a date field, and txtDueDate bound to this expression:
=[TheDate] + 30
The idea is to allow 30 days for payment, and show the record in red if that date has already past. The txtDueDate text box has Conditional Formatting (Format menu) for the condition:
[txtDueDate] < Date()
However, when you open the form, you see txtDueDate is displayed for the first row only. The status bar reads "Calculating..." constantly, and the calculation never completes for subsequent rows of the continuous form.
Because of this failure, you will see other weird behaviours as well. For example, a text box may receive focus, even if its Enabled property is set to No. A system with limited resources may even crash.
Workaround

Avoid using conditional formatting where the endless recalculation loop is triggered.
Update February 2007
This problem still occurs in Access 2003 under certain conditions (the mouse cursor over a combo in a subform when the form is opened, if the combo has conditional formatting and a zero-width bound column.)
 

Users who are viewing this thread

Back
Top Bottom