Form to show "Processing Please Wait"

G

Guest

Hello again wise ones,
I have a good bit of code that kicks off about 20 various queries to import
data from excel and verify. It takes about 30 seconds. I would like to have
a dialog box or form popup and say, Processing, please wait.
in the code, i open the form frm_Processing and then execute the code.
frm_Processing popup = YES, modal = Yes.

Problem is that the outline of the form shows, the center of the form shows
the form previous. Almost like the screen is not refreshing.
It refreshes about 20 seconds into the 30 second routine. Is there anything
I can do to get the form to fully show sooner?

Here is the code.....

10 On Error GoTo cmd_Import_MTT_Click_Error

Dim strFilter As String
Dim strInputFileName As String
Dim tempCount As Integer
Dim Response As String

'this will prompt user to select excel file to import
20 strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)",
"*.XLS")
30 strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)

35 Me.txt_InputFile = strInputFileName
37 DoCmd.OpenForm "frm_Processing"
38 Me.Refresh
39 Me.Repaint

40 DoCmd.SetWarnings False

'These tables should already be blank, but just in case...


45 DoCmd.OpenQuery "qry_Clear_temp_Excel_Action_Info"
47 DoCmd.OpenQuery "qry_Clear_temp_Excel_Action_Info_Row"
49 DoCmd.OpenQuery "qry_Clear_temp_Excel_Action_Info-0"
50 DoCmd.OpenQuery "qry_Clear_temp_Excel_Step_Info"
60 DoCmd.OpenQuery "qry_Clear_temp_Excel_Step_Info_Row"
70 DoCmd.OpenQuery "qry_Clear_temp_Excel_Step_Info-0"

'code continues on running a variety of queries
 
G

Guest

It's NOT refreshing (painting), because screen I/O is at the botton of the
heap in Windows priority hierarchy. Issue a ME.REPAINT command in VB. Or,
you could just write to the Access STATUS bar, which gets a higher priority.

Dennis
 
G

Guest

Dennis,
Thank you for the very quick response.
Line 38 above has the me.repaint command. Is this what you were referring to?

If it is, me.repaint is not doing the trick. What do you mean by writing to
the Access Status bar? Is this the bar that shows the progress of queries?
I have like a gazillion queries running so that progress bar is constantly
flashing. My queries run very quick since the tables involved are all local
to the machine, I just have a ton of em.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top