Article ID: 161087 - Last Review: January 19, 2007 - Revision: 3.3 ACC97: Cannot Use RunCommand acCmdSaveModuleAsText in CodeThis article was previously published under Q161087 Moderate: Requires basic macro, coding, and interoperability skills.
On This PageSYMPTOMS
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.
CAUSE
Microsoft Access cannot save a code module while code is running.
RESOLUTION
The 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 INFORMATIONSteps to Reproduce Behavior
REFERENCES
For 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. | Article Translations
|

Back to the top
