Access Closes Unexpectedly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I am entering a new record, and I move from my main form to the subform
I get the message:

Microsoft Access has encountered a problem and needs to close. We are sorry
for the inconvenience.

It doesn't happen when the record already exists.

Any Ideas on where to look for what causes this?
 
If this is Access 2002 or 2003, it is probably the AccessField bug.

To solve the issue:
1. Open your subform in design view.

2. Add a text box for the foreign key field. This is the field(s) nominated
in the LinkChildFields properties of the subform control. You can set the
Visible property of this text box to No so you don't see it.

3. Compact the database: Tools | Database Utilities | Compact.

In general, you don't want to see this in the subform, because it's there in
the main form. However, if the field is not represented by a control, it is
an object of type AccessField which has the bug. By placing a text box
there, Access treats it as an object of type Text box (i.e. a member of the
Controls collection of the form), which avoids the bug.

If that does not solve the problem immediately, decompile a copy of the
database by entering something like this at the command prompt while Access
is not running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"
 
Back
Top