Microsoft KB Archive/109951: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 1: | Line 1: | ||
{| | {| | ||
|width="100%"| | |width="100%"| | ||
== ACC1x: | == ACC1x: "Illegal Function Call" Error When Exporting Module == | ||
|} | |} | ||
Line 22: | Line 22: | ||
== SYMPTOMS == | == SYMPTOMS == | ||
When you run an Access Basic procedure to export a module from one Microsoft Access database to another containing a module of the same name, you receive the error message | When you run an Access Basic procedure to export a module from one Microsoft Access database to another containing a module of the same name, you receive the error message "Illegal function call." | ||
<br /> | <br /> | ||
Line 65: | Line 65: | ||
Function ExportSourceMod () | Function ExportSourceMod () | ||
DoCmd TransferDatabase A_EXPORT, | DoCmd TransferDatabase A_EXPORT, "Microsoft Access", "DEST.MDB",_ | ||
A_MODULE, | A_MODULE, "SourceMod", "DestMod" | ||
End Function </pre></li> | End Function </pre></li> | ||
<li>In the module's Immediate window, type the following line, and then press ENTER:<br /> | <li>In the module's Immediate window, type the following line, and then press ENTER:<br /> | ||
Line 80: | Line 80: | ||
== REFERENCES == | == REFERENCES == | ||
Microsoft Access | Microsoft Access "Language Reference," version 1.0, "TransferDatabase Action," pages 473-476<br /> | ||
<br /> | <br /> | ||
Microsoft Access | Microsoft Access "User's Guide," version 1.0, pages 525 and 583<br /> | ||
<br /> | <br /> | ||
Microsoft Access | Microsoft Access "User's Guide," version 1.1, pages 529 and 587<br /> | ||
<br /> | <br /> | ||
For more information about the TransferDatabase action, search for | For more information about the TransferDatabase action, search for "TransferDatabase" using the Microsoft Access Help menu. | ||
Keywords : kberrmsg kbprg<br /> | Keywords : kberrmsg kbprg<br /> |
Latest revision as of 10:49, 20 July 2020
ACC1x: "Illegal Function Call" Error When Exporting Module |
Q109951
The information in this article applies to:
- Microsoft Access versions 1.0, 1.1
SYMPTOMS
When you run an Access Basic procedure to export a module from one Microsoft Access database to another containing a module of the same name, you receive the error message "Illegal function call."
RESOLUTION
There are two methods for working around this problem:
- Use a macro with the TransferDatabase action to export the module.
- Verify that no module in the destination database has the same name as the module you want to export. If necessary, change the name of the module before exporting it.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access versions 1.0 and 1.1. This problem no longer occurs in Microsoft Access version 2.0.
MORE INFORMATION
Steps to Reproduce Problem
- Create a copy of the sample database NWIND.MDB. Name the copy DEST.MDB.
- Open the NWIND.MDB database.
Create a new module with the following sample code, and then save the module as SourceMod.
NOTE: In the following sample code, an underscore (_) is used as a line- continuation character. Remove the underscore from the end of the line when re-creating this code in Access Basic.
'******************************* ' Declarations section of module '******************************* Option Explicit Function ExportSourceMod () DoCmd TransferDatabase A_EXPORT, "Microsoft Access", "DEST.MDB",_ A_MODULE, "SourceMod", "DestMod" End Function
- In the module's Immediate window, type the following line, and then press ENTER:
? ExportSourceMod ()
The SourceMod module will be exported to the DEST.MDB database. - Repeat step 4. This time, you will receive the error message stated above, because the module already exists in the destination database.
REFERENCES
Microsoft Access "Language Reference," version 1.0, "TransferDatabase Action," pages 473-476
Microsoft Access "User's Guide," version 1.0, pages 525 and 583
Microsoft Access "User's Guide," version 1.1, pages 529 and 587
For more information about the TransferDatabase action, search for "TransferDatabase" using the Microsoft Access Help menu.
Keywords : kberrmsg kbprg
Issue type : kbbug
Technology :
Last Reviewed: November 4, 2000 |