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