Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to copy form from 1 database to another programatically

Status
Not open for further replies.

MisterDan

Technical User
Oct 26, 2006
1
US
Hi, my Access database somehow got corrupted. It won't open, and it won't repair using the repair tool. However, I've been able to copy data from the tables in the corrupted database to another (non-corrupted) database using VBA, and I'm hoping to be able to copy the forms and reports. But, I've never done that. How do you copy a form/report from one database to another using VBA?

Thanks. Dan
 
can you share that code with us? i have applications that calls for importing/exporting tables from one db to another?
thanks!
 
Have you looked at the TransferDatabase method of the DoCmd object? You can import/export tables, forms, report, macros with it. Also, you can use the TransferDatabase method in a macro. In VBA, just type in DoCmd.TransferDatabase, select TransferDatabase and hit F1. It'll explain the parameters.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top