Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Conditional Formatting Prob
Ronald de Boer 
      
2 years ago
Hi,

I have a Continuous form with Conditional Formatting where dependent upon adding a Completion Date in the CompletedDate field which is also on the form the color and description on the fields that have conditional formatting (except the current Dirty Record)on the form are all blank.

If I Mouse Click on the form the form refreshes and displays the records with the conditional formatting correctly.  If I close the form and reopen the form all the formatting is displayed correctly.

In the AfterUpdate Event I do a Me.Refresh which updates the conditional formatted dirty record field correctly but the rest of the conditional formatted fields for all other records on the form are blank (Just White).

I have tried a Me.Requery after the Me.Refresh but this did not resolve the problem.

I even tried Me.recordset.requery.

If you Mouse Click anywhere on the form then all the conditional formatted fields then refresh correctly.

What do I need to do to refresh all the records with the correct conditional formatting without doing the additional Mouse Click?

Ron dB
Richard Rost  @Reply  
          
2 years ago
Try a Me.Repaint
Ronald de Boer OP  @Reply  
      
2 years ago
Hi Richard,

I put your suggestion Me.Repaint as the last line in the AfterUpdate event and it still didn't work. Exactly the same result as before.  It's like the Me.Repaint wasn't executed. Any other suggestion please.

Regards

Ron dB
Richard Rost  @Reply  
          
2 years ago
Try using the FORM'S AfterUpdate event. It should be a combination of one or more of these:

Me.Refresh
Me.Requery
Me.Repaint
Me.Recalc


If that doesn't do it, you might have other code in there somewhere interfering. Start pulling it out. Try a new blank form.
Sami Shamma  @Reply  
             
2 years ago
A tech Help video just for:
Me.Refresh
Me.Requery
Me.Repaint
Me.Recalc

in after Update?
Richard Rost  @Reply  
          
2 years ago
Yeah, I actually thought about something like that, but I've already got this: Refresh v Requery. I kinda talk about Repaint and Recalc in that one. Those aren't as widely used.
Richard Rost  @Reply  
          
2 years ago
I posed your question to GPT. Here's what it said:

It seems like the issue you're facing is due to the fact that Access isn't fully refreshing the display of all records in the continuous form, especially when conditional formatting is applied. Here are a few approaches you can try to force the form to update all records correctly:

1. Use `Me.Repaint` after `Me.Refresh`:
   The `Repaint` method forces Access to redraw the form. Try adding it after the `Me.Refresh` in the `AfterUpdate` event.

   ```vba
   Me.Refresh
   Me.Repaint
   ```

2. Use `Me.Requery` Instead of `Me.Refresh`:
   If `Me.Refresh` isn't updating all records, try using just `Me.Requery` without `Me.Refresh`. This will force the entire recordset to be reloaded, which might resolve the issue.

   ```vba
   Me.Requery
   ```

3. Use `DoEvents`:
   Sometimes, `DoEvents` can help by allowing Access to process any pending tasks, which may fix the issue. Try placing it after the `Me.Refresh` or `Me.Requery`.

   ```vba
   Me.Refresh
   DoEvents
   ```

4. Force a repaint on all records:
   If you're still having trouble, you can try looping through all the records and manually setting the focus on each one briefly, which can force a refresh of the conditional formatting.

   ```vba
   Dim rs As DAO.Recordset
   Set rs = Me.RecordsetClone
   If Not rs.EOF Then
       rs.MoveFirst
       Do While Not rs.EOF
           Me.Bookmark = rs.Bookmark
           DoEvents
           rs.MoveNext
       Loop
   End If
   ```

Try implementing one or a combination of these solutions to see if it resolves the issue. Let me know how it works out!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 8:34:21 AM. PLT: 0s