ACC2: DeleteObject Action Causes "Illegal Function Call" MsgLast reviewed: June 8, 1997Article ID: Q122712 |
The information in this article applies to:
SYMPTOMSAdvanced: Requires expert coding, interoperability, and multiuser skills. When you use the DeleteObject action in Access Basic code to delete a module, you may receive the error message "Illegal function call." When you use this action in a macro, the module is deleted correctly.
CAUSEWhen Microsoft Access runs an Access Basic function, it loads all modules into memory. If you add or delete a function, Microsoft Access must recompile the code, but it cannot do so while the code is running.
RESOLUTIONIn Microsoft Access version 7.0, the following function correctly deletes a module:
Function DelModule() DoCmd.DeleteObject A_MODULE, "Delete Test" End FunctionNote that DeleteObject will enable you to delete any module, including the module which contains the DelModule() function.
STATUSThis behavior no longer occurs in Microsoft Access version 7.0.
MORE INFORMATION
Steps to Reproduce Behavior
|
Keywords : kberrmsg kbprg PgmObj
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |