MaxRecButton Error when exporting Macros

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top