Programmatically modifying an action query in an Access database invalidates the digital signature of the Access database (828412)
The information in this article applies to:
- Microsoft Office Access 2003
This article applies only to a
Microsoft Access database (.mdb).
Moderate: Requires basic macro,
coding, and interoperability skills.
SYMPTOMSIn a Microsoft Office Access 2003 database that is digital
signed, if you programmatically modify an insert query, an update query, or a
delete query by using Microsoft Visual Basic Editor, the digital signature of
the database may become invalid when you try to open the database.
Subsequently, with the security level set to medium or to high, the Access
database may not open, and you may receive the following error message: The code or macros in this file do not match the digital
signature. This mismatch was most likely caused by one of the following: -
The file was modified by a virus. - The file was modified by an earlier
version of Microsoft Access.
Check the file for viruses with an
updated virus scanner, and notify the publisher of this file. The current
security settings prevent Access from opening this file. You may
also receive the following warning message: Microsoft
Office Access cannot open
FullPathToAccessDatabaseFile due to security
restrictions.
Either macros are disabled or security settings
restrict access to the file because it is not digitally
signed.
WORKAROUNDTo avoid this problem, do not programmatically modify an
action query when your Access database is digitally signed. To work
around the problem that is mentioned in the "Symptoms" section of this article,
modify the security level of the Access database to low, and then remove and
then add the digital signature to the database. To do this, follow these steps:
- Start Microsoft Office Access 2003.
- On the Tools menu, point to
Macro, and then click Security.
- In the Security dialog box, select the
Low (not recommended). You are not protected from potentially unsafe
macros. Use this setting only if you have virus scanning software installed, or
you have checked the safety of all documents you open option, and then
click OK.
Note You may receive an Access warning message that prompts you to
confirm the security setting. Click Yes in the warning message
to confirm. You may have to close and then reopen Access for the new security
setting to take effect. - Open the Access database for which the problem that is
mentioned in the "Symptoms" section of this article occurs.
- On the Tools menu, point to
Macro, and then click Visual Basic
Editor.
- In the Visual Basic Editor, click Digital
Signature on the Tools menu.
- In the Digital Signature dialog box, click
Remove.
- In the Digital Signature dialog box, click
Choose.
- In the Select Certificate dialog box,
click the digital signature that you removed in step 7 in the Select
the certificate you want to use list, and then click
OK.
- In the Digital Signature dialog box, click
OK.
- On the File menu, click Close and
Return to Microsoft Office Access.
- In Microsoft Access 2003, point to Macro
on the Tools menu, and then click
Security.
- In the Security dialog box, select the
Medium. You can choose whether or not to run potentially unsafe
macros option, and then click OK.
Note You may receive an Access warning message that prompts you to
confirm the security setting. Click Yes in the warning message
to confirm. You may have to close and then reopen Access for the new security
setting to take effect. - Reopen the Access database. You may not notice the error
messages that are mentioned in the "Symptoms" section of this
article.
REFERENCES For more information about Digital Signatures, click
Microsoft Office Access Help on the Help
menu, type About digital signatures in the
Search for box in the Assistance pane, and then click
Start searching to view the topic.
Modification Type: | Minor | Last Reviewed: | 7/28/2006 |
---|
Keywords: | KbVBA kbopenfile kbDatabase kbdigitalsignatures kbProgramming kberrmsg kbMessageBox kbSecurity kbValidation kbAuthentication kbQuery kbprb KB828412 kbAudDeveloper |
---|
|