Docmd.transferdatabase code

  • Thread starter ecapox via AccessMonster.com
  • Start date
E

ecapox via AccessMonster.com

What is really sad is that my work blocks logins to accessmonster and I have
to type this on my GD iPhone. Anyways....

Issue with docmd.transferdatabase. Transferring all access object from one
database with code to about 60 other databases. All transferring of items
work except macros. Code example below:

for each ao in currentproject.allmacros
Docmd.transferdatabase _
Acexport, _
"Microsoft access", _
Strdestdb, _
Acmacro, _
Ao.name, _
Ao.name, _
False
next ao

pretty straight forward. It finds the macro but when it goesto export it to
the destination db I get a runtime error 7874- Microsoft office access cannot
find the object 'mcr_repair101pcode'. What is strange is that it references
the correct name of the macro but it says it cat find it. Very strange.

Any ideas??

Thanks
emanuele
 
T

Tom van Stiphout

On Fri, 29 Jan 2010 13:51:06 GMT, "ecapox via AccessMonster.com"

So by answering we are aiding you in bypassing your company's security
measures? Why not simply take it up by your supervisor and make your
case for that site to be unblocked?

Sometimes these errors occur when you have a mild form of corruption
in the database. Did you try compacting the database? Or manually
exporting all objects to a new database?

-Tom.
Microsoft Access MVP
 
E

ecapox via AccessMonster.com

No, they actually encourage asking questions and help. They just have an
issue with the site that hosts accessmonsters login page because they
describe it as social networking. Which obviously access monster is not.

With that now out of the way I have attempted to compact the db as well as
import everthing to a new db and I still gettye same errors.

Thanks
emanuele
So by answering we are aiding you in bypassing your company's security
measures? Why not simply take it up by your supervisor and make your
case for that site to be unblocked?

Sometimes these errors occur when you have a mild form of corruption
in the database. Did you try compacting the database? Or manually
exporting all objects to a new database?

-Tom.
Microsoft Access MVP
What is really sad is that my work blocks logins to accessmonster and I have
to type this on my GD iPhone. Anyways....
[quoted text clipped - 23 lines]
Thanks
emanuele
 
D

Daryl S

Emanuele -

It might be that the database name must be a string, and it has to include
the full path. Try making that change.
 
E

ecapox via AccessMonster.com

I'll go ahead and try that but it doesn't require it for alltables,
allqueries, allforms etc.

Also I looked in the msysobjects table and I can see the name of the macros
plain as day, so they are in there with the correct names. This is jsut crazy.


Thanks
emanuele

Daryl said:
Emanuele -

It might be that the database name must be a string, and it has to include
the full path. Try making that change.
What is really sad is that my work blocks logins to accessmonster and I have
to type this on my GD iPhone. Anyways....
[quoted text clipped - 23 lines]
Thanks
emanuele
 
E

ecapox via AccessMonster.com

Figured it out! I had set up variables for the acmacro and actables etc. I
assumed acmacro was =5 but I guess it isn't. Once I commented out that
variable it all works! Thanks for the replies and help.
ecapox said:
I'll go ahead and try that but it doesn't require it for alltables,
allqueries, allforms etc.

Also I looked in the msysobjects table and I can see the name of the macros
plain as day, so they are in there with the correct names. This is jsut crazy.

Thanks
emanuele
Emanuele -
[quoted text clipped - 6 lines]
 

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