Erratic behaviour when rapidly scrolling through subform records (1 Viewer)

David Anderson

Registered User.
Local time
Today, 01:55
Joined
Nov 18, 2007
Messages
84
I am developing an Access 2003 application associated with a photographic competition. My ScoringForm permits the selection of image classes and a subform displays all the image records in the selected class. This subform is bound to a query and contains an option group of 14 buttons - each button representing one of the possible scores to be awarded during the judging process. If an image has been allotted a score, then the text on the selected button (and only the selected button) is made bolder and has its colour changed from black to red. This makes the chosen score stand out very clearly.

Simple code for changing these button appearance properties exists in two places, the subform Current event and the option group AfterUpdate event. Generally, it all works fine. I can step through all the subform records and any scores stored in the underlying recordset will show up clearly as a selected option group button, complete with the extra highlighting mentioned above. Clicking on any button will set (or change) the score for the current image record and move any highlighting to the selected button.

My problem is that after rapidly scrolling through the subform records using the PageUp/PageDown keys or the mousewheel, sometimes the button with the extra highlighting ends up out of synch with the selected score button (it's the highlighting that's wrong, the button selection is always correct). For example, after a fast burst of record scrolling, I might end up at an image record with a score of 6. The option group button number 6 will be shown as selected but the 8 button might be the one with bold text in red.

What's going on here? Why should my code work perfectly when I move slowly through the subform records, but fail when I scroll quickly? How can I fix this?

David
 
Last edited:

Users who are viewing this thread

Top Bottom