Help with Timer Event?

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
 
G

Guest

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.
 
R

Randy

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.
 

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