B
BillA
I have built a database at work that is used to manage projects from start to
finish. I have a main form with 5 tabbed sub forms (named: Investigator;
Application; Renewal; Amendment and Status. Each tab's visibility is
controlled by a combo box that indicates the status of each project. On my
main form I also have a button that opens a form (from Carda Consultants)
that builds a hyperlink to an external document folder.
We experience an odd problem when entering data and moving from one tab to
another, or closing the Carda form, Access experiences an error and I get
“…Access has encountered a problem and needs to close.†Prior to closing, I
get a lengthy hourglass (about 3 seconds).
I’ve been able to identify VB code that when removed, the problem
disappears. The code is found in the Renewal and Amendment sub forms. The
code is:
Private Sub Form_Load()
Me.Filter = "[RenewORAmend] = 'Amend'"
Me.FilterOn = True
End Sub
Both sub form's record source is a single table named “tbl_RenewORAmend.â€
The code filters the field [RenewORAmend], in this case looking for ‘Amend’
and populates the Amendment sub form with amendment data for a particular
project. This code is also found in the Renewal form (swapping out ‘Renewal’
for ‘Amend’) and populates the Renewal sub form.
I now realize this code is causing the unexpected closure of the database.
I’m at a loss for why this is happening.
To add to my problem is that this database works flawlessly on my home
computer. Both computers are Running Access 2003 on XP w/SP3.
I would appreciate any advice or possibly an alternative to the code I am
using.
Thanks,
Bill
finish. I have a main form with 5 tabbed sub forms (named: Investigator;
Application; Renewal; Amendment and Status. Each tab's visibility is
controlled by a combo box that indicates the status of each project. On my
main form I also have a button that opens a form (from Carda Consultants)
that builds a hyperlink to an external document folder.
We experience an odd problem when entering data and moving from one tab to
another, or closing the Carda form, Access experiences an error and I get
“…Access has encountered a problem and needs to close.†Prior to closing, I
get a lengthy hourglass (about 3 seconds).
I’ve been able to identify VB code that when removed, the problem
disappears. The code is found in the Renewal and Amendment sub forms. The
code is:
Private Sub Form_Load()
Me.Filter = "[RenewORAmend] = 'Amend'"
Me.FilterOn = True
End Sub
Both sub form's record source is a single table named “tbl_RenewORAmend.â€
The code filters the field [RenewORAmend], in this case looking for ‘Amend’
and populates the Amendment sub form with amendment data for a particular
project. This code is also found in the Renewal form (swapping out ‘Renewal’
for ‘Amend’) and populates the Renewal sub form.
I now realize this code is causing the unexpected closure of the database.
I’m at a loss for why this is happening.
To add to my problem is that this database works flawlessly on my home
computer. Both computers are Running Access 2003 on XP w/SP3.
I would appreciate any advice or possibly an alternative to the code I am
using.
Thanks,
Bill