ACC: Conditionally Run AutoExec Macro in Automation Database (160951)
The information in this article applies to:
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q160951 Advanced: Requires expert coding, interoperability, and multiuser skills.
SUMMARY
When you use Automation to open a database in another instance of Microsoft
Access, if the database you are opening contains an AutoExec macro, the macro runs. If the macro contains a MsgBox action or opens a modal dialog box, code execution is suspended until you respond by closing the message box or the dialog box.
This article demonstrates a technique to conditionally turn off any or all
AutoExec macro actions when you open a database with Automation.
This article assumes that you are familiar with Visual Basic for
Applications and with creating Microsoft Access applications using the
programming tools provided with Microsoft Access. For more information
about Visual Basic for Applications, please refer to your version of the
"Building Applications with Microsoft Access" manual.
REFERENCES
For more information about using Microsoft Access as an Automation Server,
please see the following article in the Microsoft Knowledge Base:
147816
ACC: Using Microsoft Access as an Automation Server
For more information about the UserControl property, search the Help
Index for "UserControl property," or ask the Microsoft Access 97 Office
Assistant.
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbhowto kbinterop kbProgramming KB160951 |
---|
|