How to copy a report or form from one Access database to another?

Viewed 7548

I made a form in a database that I wanted to copy to another MS Access database. I can copy and paste the form design but seems like even though all the fields are copied the form width and spacing is messed up. Is there another way to copy the form design from one database to another?

2 Answers

Also you can use Application.DoCmd.TransferDatabase :

DoCmd.TransferDatabase acImport, "Microsoft access", "C:\sourceDB.mdb", acForm ,"SourceFormName", "FormNameInDestinationDB"

Or less handy two steps:

  1. Export in source DB

    Application.saveAsText acForm ,"SourceFormName", "C:\fileWithForm.txt"

  2. Import in destination DB

    Application.LoadFromText acForm ,"FormNameInDestinationDB", "C:\fileWithForm.txt"

Yes, opfen your new Access file and go to External Data > External Datasource > From Access File, specify your file path (the database path where you want to copy forms etc...) and click the option Import tables, queries, forms, reports, macros and modueles into the current database. Next chose what you want to import and hit OK.

enter image description here

Related