Close command taking long time

M

Matuag

My form has a Exit button which takes excessively long time to close
the form. I have tried both macro and VBA code such as following
without any success.

Private Sub Exit_Click()
On Error GoTo Err_Exit_Click

DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close

Exit_Exit_Click:
Exit Sub

Err_Exit_Click:
MsgBox Err.Description
Resume Exit_Exit_Click

End Sub

What could be the problem?
 
H

Hunter57

Hi again,

I thought of some more questions.
Is the DB on a network on another computer?
Is this a split DB? If so, is the back end on a server or a regular PC?

To test the speed in which each command is running you can add a beep
command after each command and check how long it takes to beep after the
button click and between beeps.

This code will make it beep after each of the other commands:

DoCmd.RunCommand acCmdSaveRecord
DoCmd.Beep
DoCmd.Close
DoCmd.Beep

Hunter57
http://easymsaccess.blogspot.com (Simple Access Tips)
http://www.ChurchManageSoftware.com
 
L

Long Live Aaron Kempf

no bitch

they don't need compact and repair; they need Access Data Projects
 

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