Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Access VBA - Copy tables to another database in same table

Hi

I have an Access database called "Source Data.accde" that is on my client's computer. I want to send them a database called "New Tables.accdb" that has a single form with a button that on click calls VBA code that pushes these tables to the "Source Data.accde" database, which is in the same folder.
The reason I am doing this is because the client is confused about how to import tables. How would I do this?

Thanks
Avatar of Randy Downs
Randy Downs
Flag of United States of America image

try this
To run the ImportExportData action in a Visual Basic for Applications (VBA) module, use the TransferDatabase method of the DoCmd object.
DoCmd.TransferDatabase acImport, "Microsoft Access", _ 
    "C:\Users\Public\Northwind.accdb", acReport, "Monthly Sales Report", _ 
    "Corporate Sales Report"

Open in new window

 


ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial