Access application fails to repaint

  • Thread starter Thread starter JF
  • Start date Start date
J

JF

I have an Access application that has a problem with a certain form
refreshing when the application is left alone for a while and then used
again.

The occurrence of this issue isn't always consistent, but the the results
are. When the app is "switched to" the screen appears entirely gray except
for the title bar way at the top (along with the minimize/maximize/close
buttons). I can still move the mouse around and the keyboard shortcuts
still work. In fact, one of the keys is used to perform a search on the
current field. When that is pressed, if the search returns results,
navigation arrows appear on the menubar (as they should) but still the form
below is unpainted. However, when I click the navigation arrow, the form
finally repaints.

Is there some way to capture when the application as a whole gains focus so
I can force a repaint? Are there any other suggestions or any ideas as to
what may be causing this?

Regards,

JF
 
You can try rebuilding the form with
Application.SaveAsText/Application.LoadFromText. See my website for some
sample code you can adapt:

http://www.datastrat.com/Code/DocDatabase.txt

If the time is more than a few seconds, I'd bet that the problem is either
with Windows, or even more likely with either your video card or driver.
First try and download the latest drivers for your card and install them.
That's the cheapest path to take and the one with the high chance of
success.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Thanks for the reply Arvin.

I will give your advice a try, but I was wondering at what point would I
invoke the "LoadFromText" method? Can I capture the event when the user
switches back to the Access application?

Also, as I stated before, this issue occurs inconsistently. Although, I can
force it to happen more times than not by starting a screensaver. As far as
it being a video card issue - the issue has been reported by many users who
presumably have all kinds of video cards. So, I'm not so sure that it is a
driver problem. In addition to a screensaver, there have been reports of
the issue occurring when minimizing the application and leaving it alone for
a while, and when switching between MS Word and MS Outlook.

The worst part about this issues (as will all bugs) is that I can't
consistently reproduce the problem.
 
Back
Top