Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form loses focus and stops repainting 1

Status
Not open for further replies.

thromada

MIS
May 10, 2004
30
US
Hi all,
Using Access 2003 or 2000, I cannot keep focus on a form while it's looping through records and displaying the results/progress. It will start out fine, but after a while, it loses focus and continues to run, but I no longer see the results/progress. When I first run the form, my Windows task bar shows 2 tasks open... "SearchRep : Project - databasename", and "SearchRepMain : Form". After while, SearchRepMain loses focus and a 3rd taskbar task shows up named "Microsoft Access".
I've tried using acSysCmdUpdateMeter as a progress indicator, but that does the same thing. I've made the form Modal, but still it loses focus.
Any ideas?
Thanks,
Tom.
 
At the end of the repeated look add a line

DoEvents





'ope-that-'elps.



G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
That did it. I actually had DoEvents outside of the Loop. But putting it inside the Loop solved the problem.
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top