K
Katrina
I have a code to export all the modules in my current
database into another database. I also have the same
code to export all the macros. The code to export the
macros works fine. The same code (with module replacing
macro) for the modules does not work. Here is the code I
use.
COUNTER = 1
Dim objModule As Object
For Each objModule In CurrentProject.AllModules
TCount = CurrentProject.AllModules.Count
Forms!systemmessage.Controls!Details.Caption
= "Exporting Module " & COUNTER & " of " & TCount
Forms!systemmessage.Repaint
Debug.Print objModule.NAME
DoCmd.TransferDatabase acExport, "microsoft
Access", Location, acModule, objModule.NAME,
objModule.NAME
COUNTER = COUNTER + 1
Next objModule
This is the error I get.
Run-time Error '2455':
You entered an expression that has an invalid reference
to the property MaxRecButton
The code is from behind a form.
Any Ideas on what this error means, or how to fix it?
Thanks
database into another database. I also have the same
code to export all the macros. The code to export the
macros works fine. The same code (with module replacing
macro) for the modules does not work. Here is the code I
use.
COUNTER = 1
Dim objModule As Object
For Each objModule In CurrentProject.AllModules
TCount = CurrentProject.AllModules.Count
Forms!systemmessage.Controls!Details.Caption
= "Exporting Module " & COUNTER & " of " & TCount
Forms!systemmessage.Repaint
Debug.Print objModule.NAME
DoCmd.TransferDatabase acExport, "microsoft
Access", Location, acModule, objModule.NAME,
objModule.NAME
COUNTER = COUNTER + 1
Next objModule
This is the error I get.
Run-time Error '2455':
You entered an expression that has an invalid reference
to the property MaxRecButton
The code is from behind a form.
Any Ideas on what this error means, or how to fix it?
Thanks