Help with Timer Event?

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

I have a form which has a popup form stating; "Please wait while files are
downloading" I would like the popup form to stay up for an additional 2
seconds. The popup form is "Please Wait" Here's my code..Thanks...Randy

Private Sub lbxFiles_DblClick(Cancel As Integer)
DoCmd.SetWarnings False
DoCmd.OpenForm "Please Wait"
DoCmd.RepaintObject

On Error GoTo Err_lbxFiles_DblClick
Dim stDocName As String
DoCmd.TransferSpreadsheet acImport, 8, "AnalysisForm", FirstRemovable() &
Me.lbxFiles, True, ""
DoCmd.Close acForm, "Please Wait"

Err_lbxFiles_DblClick:
If Err.Number = 2501 Then
MsgBox "Import Files Has Been Cancelled, The Floppy Disk May Contain
Duplicate Files"
Resume Next

End If
DoCmd.SetWarnings True
End Sub
 
Put the code you downloaded into a separate standard module.
In the Form's Load event:
Call sSleep(2000)
DoCmd.Close asForm, Me.Name, acSaveNo
The form will remain open for 2 seconds then close.
 
Thank you, that was it..
Klatuu said:
Put the code you downloaded into a separate standard module.
In the Form's Load event:
Call sSleep(2000)
DoCmd.Close asForm, Me.Name, acSaveNo
The form will remain open for 2 seconds then close.
 
Back
Top