Access 2003 abends on compact after compile

S

Shambalad

I have encountered an error with Access 2003.
If an Access mdb database contains a reference to another mdb database and
one attempts to 'Compact and Repair' the database after compiling the
database in the same session, Access will end in error.
Scenario:
Create a new database named Test.mdb.
Create a new table called tblStates using the 'Design' method. tblStates has
two fields: ID (AutoNumber) and State (Text).
Populate the table manually (i.e. data entry).
Create a new form (frmStates) using the design wizard, with tblStates as the
form record source. Default form view is continuous. Detail section contains
one textbox with field 'State' as control source.
Add a command button in Header section called cmdExit which closes the form.
Compile the database, then compact it. Compact completes without error.
Close Test.mdb
Create a new database named Test1.mdb.
Create a new module named basTest. In basTest add the following subroutine:

Public Sub TestMsg()
MsgBox "Test"
End Sub

Close Test1.mdb and reopen Test.mdb. In Test.mdb, add a reference to
Test1.mdb.
Compile the database, then compact it. Access ends in error
Open Test.mdb. Remove the reference to Test1.mdb.
Compile the database, then compact it. Compact completes without error.

Has anyone else encountered this? Is this a bug?
 
S

Shambalad

BTW - My current version is Access 2003 11.0.6566.8107 SP2.
I have all the current updates installed for Access, Office and Windows XP.
 
G

Guest

Yes, it's known (or at least similar problems are known), and
yes, I guess it's a bug. No, MS has not admitted that it is
a problem.

If you are using Compact on Close, you may have to turn that off.

Here's a similar report:
http://groups.google.com.au/group/microsoft.public.access/browse_frm/thread/c4f38ab89f13d5f

When working in Access, I am constantly closing and re-opening Access.

Closing the database is not enough: you have to quit Access and re-start.

This particular problem is new with A2003, (but in general A2000 was
even worse)

(david)
 
S

Stephen K. Young

Shambalad said:
I have encountered an error with Access 2003.
If an Access mdb database contains a reference to another mdb database and
one attempts to 'Compact and Repair' the database after compiling the
database in the same session, Access will end in error.

This hotfix worked for me.
http://support.microsoft.com/kb/902445

- Steve
 

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