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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I release Access to use Windows? 1

Status
Not open for further replies.

EckyThump

MIS
May 15, 2007
33
GB
I have a database that runs a long procedure displaying a progress bar whilst it is doing so.
The problem is that I can not use the computer for anything while this is happening.
Is there any code that can be added to release me to use the operating system fo other things While this is happening??
Thanks.
 
If you are using a loop or the like in your code, include

DoEvents

somewhere in your loop. This will release priority back to Windows to check if anything else needs to be done. Not perfect - but does help.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
That seems to do the business! many thanks for that.
I have never had to use this function before, you liva and learn!
One small observation though. While the progress bar is running the DoEvents function causes the buttons to flicker!
A minor annoyance, is there a solution to this?
 
You can try to turn off Paint during that time but I don't know....

Look through the Paint events and try them. Been a long time since I did any of that in Access so I am bit rusty.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top