Allow Addition property in subform causes crash

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

Guest

When I set the Allow Addition property to No on a subform and try to open
main form causes Access 2003 to crash. Anyone heard of this before? Change
back to Yes and works ok.
 
While changing the property is triggering the crash, it may not be the
cause.

Try this sequence, which deals with 3 possible causes:

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact

3. Close Access. Make a backup copy of the file. Decompile 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"

4. Open Access, and compact again.

5. Open the main form in design view. Right-click the edge of the subform
control, and choose Properties. On the Data tab, write down the setting of
the LinkMasterFields and LinkChildFields. Clear both properties (i.e. delete
them.) Save the form. Close.

6. Open the subform in design view. See if the field named in
LinkChildFields is actually present on the subform as a text box. If not,
add the text box bound to this field, and with the same name as the field.
Set its Visible property to No if you wish. Save. Close.

7. Open the main form again, and restore set the LinkMasterFields and
LinkChildFields again. Access should now discover that the LinkChildFields
refers to a text box and not merely to a field in the subform's recordsource
(hence an AccessField type object.) Save. Close.

8. Compact the database again.

9. Test the form.

Any name-autocorrect errors are gone. Compilation errors are gone. The bug
related to the AccessField object is averted. Hopefully the form is now
stable for you.

I have assumed here that "crash" means Access is shut down by Windows. If
you just meant that the code is stopping with an error, this approach is not
the solution.

If you still have problems after this, tell us more about the subform.
 
When opening form the send error report to Microsoft appears and asks if you
want to repair database. Still have problem when set manually but decided to
change property with VBA when main form opens and works. Makes me kind of
nervous though. Also tried importing everything in a new database but still
occurred. The form doesn't have any links. It is a form with a few controls
to query subform data and print reports. I will need to see if I can
recreate somewhere else. Thanks
 
Back
Top