rgcole
asked on
Give control back to a form so it can update itself during my subroutine.
Can't remember the statement.
In short, within a routine I run three different queries. I open a form to give the status of the routine to the user.
i.e. (pseudo code)
sub a
open form "myMsgBox"
msg = "performing query 1"
--->......what is the code that I should put here?
open query1
msg = "performing query 2"
--->......what is the code that I should put here?
open query2
msg = "performing query 3"
--->......what is the code that I should put here?
open query3
end sub
What is the statement that I would use to give control back to the form allowing it to update.
I searched the EE db and couldn't run find an answer. I think the code is something like doSysEvent or something.
P.S. Pls help me do it this way. I don't want to use the status bar or any other method.
Thanks,
Robert
In short, within a routine I run three different queries. I open a form to give the status of the routine to the user.
i.e. (pseudo code)
sub a
open form "myMsgBox"
msg = "performing query 1"
--->......what is the code that I should put here?
open query1
msg = "performing query 2"
--->......what is the code that I should put here?
open query2
msg = "performing query 3"
--->......what is the code that I should put here?
open query3
end sub
What is the statement that I would use to give control back to the form allowing it to update.
I searched the EE db and couldn't run find an answer. I think the code is something like doSysEvent or something.
P.S. Pls help me do it this way. I don't want to use the status bar or any other method.
Thanks,
Robert
ASKER
I am opening a form "mymsgbox" and filling it in with different messages as the routine proceeds. But, while in the routine the form didn't draw itself perfectly.
There is a call I believe that gives control back to Access so it can do some housekeeping to maybe complete the drawing of the screen.
Robert
There is a call I believe that gives control back to Access so it can do some housekeeping to maybe complete the drawing of the screen.
Robert
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
-j-,
Thanks.
I used DoEvents. All the necessary updating of the screen now occurs.
Robert
Thanks.
I used DoEvents. All the necessary updating of the screen now occurs.
Robert
good to go! When you comin back to the TOP 15??
msgbox comes to mind, because I presume you're delivering the messages one at a time.
if not....
You need to open a separate form in popup mode that has an unbound textbox and concant the message to the popup form's text box as each query runs separated by a dbengine.idle and a forms!MyPopup.repaint
Having this code in the form open would require the routine to run completely before giving over control to the form presentation.
regards
Jack