Repaint problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

I have created a PleaseWait form to display for 3 seconds
and then have it close while several imports and queries
are running(code below).

Timer Interval initally set to 3000 in Form's properties.

Private Sub Form_Timer()
Me.TimerInterval = 0
Forms!frmPleaseWait.SetFocus
DoCmd.Close
End Sub

When the PleaseWait form opens(see code below), it does
not display properly. How do I use the Repaint method so
that the form displays properly while the import and
queries are running? Can someone point out the error in my
code below?


If ans <> vbYes Then
GoTo ExitNow
End If

DoCmd.Hourglass True

DoCmd.Minimize
stDocName = "frmPleaseWait"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Me.Repaint

'Import the daily transaction text file and append
records to tblDailyTransactionsTemp
Select Case Me!ExportParameters
Case 1
DoCmd.TransferText
acImportFixed, "ImportSpecs", "tblDailyTransactionsTemp",
RIImportFilePath, False, ""
Case 2
"Code Continued"

Thanks,
Rohit Thomas
 
What do you mean by "not display properly"?
One thing to note is that by writing Me.Repaint you are not asking the
"please wait" form to repaint, but you're asking the form you are currently
in to repaint. But honestly, you shouldn't really have to call repaint in
this case, by loading and opening the form, a repaint should occur during
this process anyway. Let us know a little bit more about the symptoms you
are seeing.
 
Back
Top