After you enable content for a Microsoft Office Access 2007 database, the parent database is disabled when you add a reference to a different Access 2007 database. You expect the parent database to remain enabled, or you expect a security notification to appear when the database status changes.
When you remove the reference, the parent database is automatically enabled again.
↑ Back to the top
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
↑ Back to the top
Steps to reproduce the behavior
- Start Access 2007.
- Click the Microsoft Office Button, and then click New.
- Click Blank Database, type DatabaseName1 in the File Name box, and then click Create.
- On the Create tab, click the arrow under Module in the Other group, and then click Module.
- In the Visual Basic Editor, replace the code in the DatabaseName1 - Module1 (code) window with the following:
Option Compare Database
Option Explicit
Sub Library_Name()
MsgBox "Library_Name"
End Sub
- On the File menu, click Save DatabaseName1.
- In the Save dialog box, select Module:Module1 under Save changes to the following objects, and then click Yes.
- In the Save As dialog box, click OK.
- On the File menu, click Close and Return to Microsoft Office Access.
- Click the Microsoft Office Button, and then click Close Database.
- Click the Microsoft Office Button, and then click New.
- Click Blank Database, type DatabaseName in the File Name box, and then click Create.
- Click the Microsoft Office Button, and then click Close Database.
- Click the Microsoft Office Button, and then click Open.
- In the Open dialog box, select DatabaseName, and then click Open.
- In the Security Alert dialog box, click Enable Content.
- In the Trust in Office dialog box, click to select Enable this Content, and then click OK.
- On the Database Tools menu, click Visual Basic.
- In the Immediate window, type the following command:Notice that the output is 9.
- On the Tools menu, click References.
- In the References - DatabaseName dialog box, click Browse.
- In the Add Reference dialog box, click Microsoft Office Access Databases (*.accdb) in the Files of type list, select DatabaseName1, and then click Open.
- Click OK to close the References - DatabaseName dialog box.
- In the Project - DatabaseName(DatabaseName) window, click DatabaseName, and then type the following command in the Immediate window:Notice that the output is blank.
- On the Tools menu, click References.
- In the References - DatabaseName dialog box, click to clear DatabaseName1, and then click OK.
- In the Immediate window, type the following commands:Notice that the output is 9.
↑ Back to the top