Microsoft KB Archive/174342: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 125: | Line 125: | ||
* Microsoft DAO 3.5 Object Library | * Microsoft DAO 3.5 Object Library | ||
The procedure in the | The procedure in the "Steps to Reproduce Problem" section is intended to duplicate the error described in the "Symptoms" section. It does not indicate the correct way to secure a Microsoft Access database. Please see the "References" section for more information about Microsoft Access Security. | ||
=== Steps to Reproduce Problem === | === Steps to Reproduce Problem === | ||
Line 171: | Line 171: | ||
<li>On the Debug menu, click Compile Loaded Modules. (Note: Use the Run menu in Access 7.0).<br /> | <li>On the Debug menu, click Compile Loaded Modules. (Note: Use the Run menu in Access 7.0).<br /> | ||
<br /> | <br /> | ||
Note that you receive one of the error messages described in the | Note that you receive one of the error messages described in the "Symptoms" section.</li></ol> | ||
Line 179: | Line 179: | ||
== REFERENCES == | == REFERENCES == | ||
For more information about References, search the Help Index for | For more information about References, search the Help Index for "References, type."<br /> | ||
<br /> | <br /> | ||
For more information about security, search the Help Index for | For more information about security, search the Help Index for "security, securing a database," or ask the Microsoft Access 97 Office Assistant.<br /> | ||
<br /> | <br /> | ||
For additional information, see the Microsoft Access Security FAQ which is located on the following Microsoft World Wide Web site:<br /> | For additional information, see the Microsoft Access Security FAQ which is located on the following Microsoft World Wide Web site:<br /> |
Latest revision as of 11:07, 21 July 2020
Article ID: 174342
Article Last Modified on 1/20/2007
APPLIES TO
- Microsoft Access 95 Standard Edition
- Microsoft Access 97 Standard Edition
This article was previously published under Q174342
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you use the User-Level Security Wizard to secure a database that references libraries other than those included by default, code in the resulting database may not compile correctly. You receive the following error messages:
-or-
CAUSE
The wizard creates a new default database into which it imports the objects from the unsecured database. References to libraries that existed in the unsecured database are not automatically created in the new secure database.
RESOLUTION
Make sure that the same library references selected in the original, unsecured database are also selected in the new, secured database. To do so, follow these steps:
- Open the original, unsecured database in Microsoft Access.
- In the Database window, click the Modules tab.
- Select any module and click Design, or if no modules exist in the Modules window, click New.
- On the Tools menu, click References.
- Write down the name of each library that has a check mark next to its name.
- Click Close; then close the module, and close the unsecured database.
- Open the new, secured database in Microsoft Access.
- In the Database Window, click the Modules tab.
- Select any module and click Design, or if no modules exist in the Modules window, click New.
- On the Tools menu, click References.
- In the References dialog box, click to select the check boxes for the same libraries selected in the unsecured database.
- Click OK.
- On the Debug menu, click Compile Loaded Modules.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
MORE INFORMATION
When Microsoft Access creates a new database, three references are included by default. These references are as follows.
Microsoft Access 7.0
- Visual Basic For Applications
- Microsoft Access for Windows 95
- Microsoft DAO 3.0 Object Library
Microsoft Access 97
- Visual Basic For Applications
- Microsoft Access 8.0 Object Library
- Microsoft DAO 3.5 Object Library
The procedure in the "Steps to Reproduce Problem" section is intended to duplicate the error described in the "Symptoms" section. It does not indicate the correct way to secure a Microsoft Access database. Please see the "References" section for more information about Microsoft Access Security.
Steps to Reproduce Problem
- Open any sample database in Microsoft Access.
- In the Database window, click the Modules tab.
- Click New.
- On the Tools menu, click References.
- Click to select the Microsoft Office 8.0 Object Library.
NOTE: If you are using Microsoft Access 7.0, click to select the Microsoft Office 95 Object Library. - Click OK.
Type the following code into the module:
Function LostReference() ' This function sets the variable X to a constant that is ' defined in the Microsoft Office Object Library. If ' there is no reference to the Microsoft Office Object ' Library, this code generates a compile error. The ' Microsoft Office Object Library is not referenced ' by default. Dim X X = offPropertyTypeDate End Function
- On the Debug menu, click Compile Loaded Modules. (Note: Use the Run menu in Access 7.0).
- On the File menu, click Save; then type TestModule in the Module Name box.
- Close the Module.
- On the Tools menu, point to Security, and then click User-Level Security Wizard. Follow the instructions provided by the wizard.
NOTE: You will receive a warning message if you are logged in as the Admin user:
Click Yes; this will not affect this example.
- Open the newly secured database in Microsoft Access.
- In the Database window, click the Modules tab.
- Select TestModule from the Database window and click Design.
- On the Debug menu, click Compile Loaded Modules. (Note: Use the Run menu in Access 7.0).
Note that you receive one of the error messages described in the "Symptoms" section.
REFERENCES
For more information about References, search the Help Index for "References, type."
For more information about security, search the Help Index for "security, securing a database," or ask the Microsoft Access 97 Office Assistant.
For additional information, see the Microsoft Access Security FAQ which is located on the following Microsoft World Wide Web site:
http://support.microsoft.com/support/access/content/secfaq.asp
NOTE: Because the Microsoft Web site is regularly updated, the site address may change without notice. If this occurs, link to the Microsoft home page at the following address:
http://www.microsoft.com/
Additional query words: prb OFF97 doesn t
Keywords: kbbug kberrmsg KB174342