Import a form from .MDB into .ADP in VB.NET

J

J-P

I'm using VB.NET to copy Access data base (.MDB) to Access project
(.ADP)
Actualy to copy FORMS I copy from a source MDB to a destination ADP.
But the result is the module (VBA code) attach to the form dont
follow. In Access the export wizard in the MDB give the same result.
But the Import wizard in the ADP import the form right.

Is there a way to import in VB.NET or a way to go around this?

Thanks

my actual VB.NET code:
dim SourceAccApp New Access.ApplicationClass()
SourceAccApp.OpenCurrentDatabase("C:\source.mdb", False)

SourceAccApp.DoCmd.OpenForm(objectName, AcView.acViewDesign)
SourceAccApp.DoCmd.CopyObject("C:\destination.adp", FormName,
AcObjectType.acForm, FormName)
 

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