jtseltmann
Programmer
I have been reading through the threads on how to effectively use DoEvents and I just have one question. I too have had users see that Windows shows the app as not responding due to a long process and they try go cancel it. My problem or situation is this. I have a huge ascii input file that I am running through and processing. The outer loop rips through this file and has many subprocesses. It takes about 1 second to process each record but sometimes 1-2 hours on the server to complete the process entirely. I have a status field that updates with a "...processing rec 1 - 25 of 500..." so the user knows where the code is in relation to completing. I have a variable set to 'break every xx recs' so this controls when the update is done. The DoEvents call is set inside the Sub that changes the status text.
My question is this...Is this set up ok? The problem in the past is that the db would not regain focus if the user clicked off of it. Now, if the user clicks off...they are allowed to process and if they click back the db regains focus when the DoEvents process is called. Is this adequate?
Thanks for any suggestions.
My question is this...Is this set up ok? The problem in the past is that the db would not regain focus if the user clicked off of it. Now, if the user clicks off...they are allowed to process and if they click back the db regains focus when the DoEvents process is called. Is this adequate?
Thanks for any suggestions.