Solved

Give control back to a form so it can update itself during my subroutine.

Posted on 2003-11-26
5
326 Views
Last Modified: 2006-11-17
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
0
Comment
Question by:rgcole
  • 3
  • 2
5 Comments
 
LVL 32

Expert Comment

by:jadedata
ID: 9827896
Hey rgcole!

  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
0
 
LVL 9

Author Comment

by:rgcole
ID: 9828015
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
0
 
LVL 32

Accepted Solution

by:
jadedata earned 125 total points
ID: 9828046
dbengine.idle
doevents
and .repaint

would all force the issue.  sometimes ya just need a bigger hammer...

The one I wouldn't expect to see repainting would be the form_Open calling form
0
 
LVL 9

Author Comment

by:rgcole
ID: 9828132
-j-,
Thanks.

I used DoEvents.  All the necessary updating of the screen now occurs.

Robert
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9828160
good to go!  When you comin back to the TOP 15??
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS Access creating a Chart from Search result on Form view 2 21
bind Combobox 4 29
Access query with left expression 9 31
Query to summarise data Like Pivot Table 3 29
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now