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