ACC97: Close Method Does Not Accept Missing Optional ArgumentLast reviewed: October 16, 1997Article ID: Q175215 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. When you use the Close method of the DoCmd object in Visual Basic for Applications, you cannot add optional arguments. If you try to use optional arguments with the Close method, you receive the following error message:
Type Mismatch CAUSEThe Close method requires an argument type to be set for the optional values somewhere in the code. The Type Mismatch error occurs because one or more of the arguments cannot be converted to an argument type without explicitly saying so in code.
RESOLUTIONYou can use Visual Basic to check for missing arguments after the function has been called and set the argument type once you are running the code. To set the type of optional arguments, follow these steps:
MORE INFORMATION
Steps to Reproduce Behavior
|
Additional query words: prb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |