M
Me
Hi, I have a problem with an Access application I wrote to
programmatically Import all objects from an MDB 1 to MDB 2, while
running the code on MDB 3.
The code runs on an Access 2000 MDB. When I try to import forms or any
other "document" type objects (macros, modules, reports or macros)
between two Access 97 databases using my application, it works fine.
But when I use it to import btween two Access 2000 databases,
only tables/queries go through. All other objects terminate with the
error:
2501 The TransferDatabase action was canceled.
at this line:
appAccess.DoCmd.TransferDatabase acImport, "Microsoft
Access",SourceDBPathName, intConst, strdocname, strdocname, False
(its in a big loop to get all the objects from the source to the
destination).
appAccess is initialized so:
Set appAccess = GetObject(TargetDBPathNAme, "Access.Application.9")
the intconst variable holds the constant for the object type, forms,
macros etc.
As mentioned, on two Access 97 db's it works fine ( I have a little
error detecting code, to switch Access.Application.9 to
Access.Application.8 for the different version. but otherwise
everything's the same.
Any insights?
Thanks
HH.
programmatically Import all objects from an MDB 1 to MDB 2, while
running the code on MDB 3.
The code runs on an Access 2000 MDB. When I try to import forms or any
other "document" type objects (macros, modules, reports or macros)
between two Access 97 databases using my application, it works fine.
But when I use it to import btween two Access 2000 databases,
only tables/queries go through. All other objects terminate with the
error:
2501 The TransferDatabase action was canceled.
at this line:
appAccess.DoCmd.TransferDatabase acImport, "Microsoft
Access",SourceDBPathName, intConst, strdocname, strdocname, False
(its in a big loop to get all the objects from the source to the
destination).
appAccess is initialized so:
Set appAccess = GetObject(TargetDBPathNAme, "Access.Application.9")
the intconst variable holds the constant for the object type, forms,
macros etc.
As mentioned, on two Access 97 db's it works fine ( I have a little
error detecting code, to switch Access.Application.9 to
Access.Application.8 for the different version. but otherwise
everything's the same.
Any insights?
Thanks
HH.