Results 1 to 4 of 4
  1. #1
    burt1215 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2016
    Posts
    34

    Updating Conditional Formatting

    I'm not sure if this is the correct place to put this, but I have a question on conditional formatting.

    Basically, my conditional formatting on my datasheet subform takes a second or three to update when the form is loaded or changed.
    It's not a serious problem, but it would just look cleaner if it updated or loaded instantly.



    When the record is selected, the formatting will instantly load.

    I've attached a video, below showing what happens when the form is loaded or data is changed. You can't see my change data popup form because the recorder I used only records a single window (sorry, I didn't know that at the time).

    The code I use to reload my data after I update is this.

    Code:
    Forms!frmGUI!fsubSchedule.Form!fsubJuly.Form.RecordSource = Forms!frmGUI!fsubSchedule.Form!fsubJuly.Form.RecordSource
    Any help would be super awesome.
    Thanks guys.

    Here's the video.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    The only way of improving the performance of conditional formatting is to a) ensure the formulae used are efficient (particularly avoid using UDF's and wildcards) and b) are ordered in 'most likely' to occur - conditional formatting starts with the first test and keeps working down until a condition is true.

    I would go as far as to say that if for example you wanted a cell to have a background colour of red to highlight zero values and the default background is white, rather than testing for 0 and setting the back colour to red, test for <> 0 and set the back colour to white and make the default red.

  3. #3
    burt1215 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2016
    Posts
    34
    test for <> 0 and set the back colour to white and make the default red
    That's an interesting premise.
    It definitely switches my perspective on thinking in regards to conditional formatting.
    However, wouldn't this still give the same issue I'm having: Everything would show up as red, and once it loads, things that aren't zero would turn white?

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    yes but I was trying to address this issue

    my conditional formatting on my datasheet subform takes a second or three to update when the form is loaded or changed.
    i.e. speed things up - It wouldn't take long to set up a test

    the other thing that might work (again you'll need to test it) is to use the echo off method.

    https://msdn.microsoft.com/en-us/lib.../ff834500.aspx

    You'll need to know when done and when finished so perhaps will need to remove the linkchild/master property values if used and either set them in code or use a filter or refresh the recordsource with a query utilising a criteria. Reason I'm not sure it will work is that if you scroll down using the scroll bar, conditional formatting does not kick in until the bar is released - although again, you can use your own scrollbar to take full control of what is happening.

    Another thought - develop your own paging so that you don't scroll (limits your recordset to say 30 or 40 records, 1st 30, 2nd 30 etc)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-12-2015, 10:46 AM
  2. Replies: 6
    Last Post: 05-26-2013, 09:10 PM
  3. Conditional formatting
    By avarusbrightfyre in forum Forms
    Replies: 3
    Last Post: 07-01-2011, 11:18 AM
  4. Conditional Formatting
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-30-2010, 09:31 PM
  5. Conditional Formatting
    By cevatyildiz in forum Forms
    Replies: 8
    Last Post: 04-30-2010, 12:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums