ACC97: Cannot Use RunCommand acCmdSaveModuleAsText in CodeLast reviewed: August 29, 1997Article ID: Q161087 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. When you run code that contains the RunCommand method with the acCmdSaveModuleAsText constant, you may receive the following error message:
The command or action 'SaveModuleAsText' isn't available now.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 the "Building Applications with Microsoft Access 97" manual.
CAUSEMicrosoft Access cannot save a code module while code is running.
RESOLUTIONThe following two methods describe how to save a code module programmatically.
Method 1: Using the OutputTo method
Method 2: Using the RunCommand Macro Action
MORE INFORMATION
Steps to Reproduce Behavior
REFERENCESFor more information about the OutputTo method, search the Help Index for "OutputTo method." For more information about the RunCommand method, search the Help Index for "RunCommand method." Keywords : kberrmsg kbprg PgmHowTo PgmObj MdlOthr Version : 97 Platform : WINDOWS Hardware : x86 Issue type : kbprb Solution Type : Info_Provided |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |