DoCmd.Close very slow in A2007

A

AlanLee

I have a Contact form which is based on a query with approx 5000 records.

I close the Form with a DoCmd.close button.

This was all really simple and worked a treat in A2003. When I run it on
A2007, it takes around 20 seconds for the form to physically leave the
screen. I originally retained the database as A2003 format. I have now
upgraded it to an A2007 format, but the problem persists.

The form will use either Archived or non-archived records which are
determined by a simple query.

So I have the code :
The query is very simple, I either select the archived or the non archived
contacts - a simple boolean field. The only slight complication is that I use
the same form for both - but that I select the Record Source in the Open
Event :

Private Sub Form_Open(Cancel As Integer)
If ArchClient = False Then
Me.RecordSource = "qryAllContactsLive"
Me!SelectName.RowSource = "qryNameFirstLookupLive"
Me!SelectSurname.RowSource = "qryNameSecondLookupLive"
Me!btnArchive.Caption = "Archive this Contact"
Else
Me.RecordSource = "qryAllContactsArchived"
Me!SelectName.RowSource = "qryNameFirstLookupArchived"
Me!SelectSurname.RowSource = "qryNameSecondLookupArchived"
Me!btnArchive.Caption = "Unarchive this Contact"
End If
End Sub

I have tried the acSaveNo option when I close the form, but this doesn't help.

When I run the archived list, where there are only a few records, the Form
Close is almost instant - which means that the number of records appears to
be an issue.

To re-iterate, A2003 had no problems with this situation.

Any help gratefully received. TIA Alan
 
M

markmarko

I applied this hotfix to my machine which is used for access development. It
worked well, forms now close in under a second, instead of taking 25-30
seconds.

I'd like to apply it to the end user machines, which are all running Access
Runtime. The hotfix will not install, saying there is a more recent version
already installed. The users are experiencing the slow form closing, however.

Is there a workaround to get the hotfix to install?
 
A

AlanLee

I'm sorry but I cannot help here as the environment at the operational site
is one where all the users have full Access.

At the time I read about this problem in www.utteraccess.com, I think there
were some references to problems with the runtime version. Sadly I cannot
remember if there was any conclusion.

Good Luck, Alan
 

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