Transferring a form to a VBA password protected DB

Leif

Registered User.
Local time
Today, 03:27
Joined
Jan 20, 2011
Messages
79
I have a mdb file that does not have database or user level security, but it does have a VBA password.

I want to transfer (overwrite) a new form to this database from another Access database. The form I'm exporting has VBA code. When I try using docmd.TransferDatabase I get an error. The error is:

"The TransferDatabase action was canceled."

The line is:

DoCmd.TransferDatabase acExport, "Microsoft Access", txtCheckInFile, acForm, "SubformLineSummaryContractor", "SubformLineSummaryContractor", False, False

where txtCheckInFile is the location and mdb file name I'm trying to send the export.

It might be because the form already exists. So, if I go into the database and delete form, and repeat the export I get the message:

"Microsoft helps protect this Visual Basic for Applications Project with a password. You must supply the password in the Visual Basic Editor before you can perform this operation."

My question is it possible to transfer a form to a MDB that has a passworded VBA? I know the VBA password.

If not, perhaps it is possible to remove the VBA password in the database (using VBA), make my export, and then add the password back in?

Thanks,
Leif
 
The whole point of passwords is protection, so to be able to easily remove them defeats the objective.

Why can't you just go into the target database and import the updated form?
 
I don't really want to remove the password, but I thought that may be one way to update the form. I know the password, so it is not like I'm trying to break-in to the database.

I can go to the target database and manually remove the problem coding. However, it a bit more complex.

I have a master database and a "checkout" (Child) database. The master creates the child database. There are hundreds of these child databases floating around that will eventually be checked in. I don't want to have to manually handle each of the databases as they come in.

For a bit more detail, these child databases have some vba coding that work fine in 2003 but fail in 2010. We are converting to 2010. Hence my problem. I would like a solution that they apply to update these child databases and remove the problem experienced under 2010.
 

Users who are viewing this thread

Back
Top Bottom