Link to home
Start Free TrialLog in
Avatar of AnnetteDavid
AnnetteDavidFlag for South Africa

asked on

Using Transfer Database Macro from LInked Database

I have a database that exports and appends just the contents of the tables into another database and this is emailed and imported into Head Office.  It has worked perfectly for years.  However we have now split the original database and when we use the Transfer Database command in a macro (built into a button that the user just clicks), it transfers the link rather than the contents of the linked table.  I just cant seem to get my head around how to solve this.    

It would work perfectly if I did the macro from the Back End, but this is usually done by an End User who has no idea what a Back End is and I dont want them going near the Back End if I can help it.
Any help would be appreciated
Avatar of rockiroads
rockiroads
Flag of United States of America image

Do you know the list of tables you have? or do you iterate thru them?

you can maybe trying opening the backend using access object then transferring

eg
        Set acc = New Access.Application
        acc.OpenCurrentDatabase "c:\mybackenddb.mdb", False
       
        acc.DoCmd.TransferDatabase acexport, "Microsoft Access", "c:\myotherdb.mdb", acTable, "tablename", "tablename"
       
        acc.CloseCurrentDatabase
        Set acc = Nothing

ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland 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
Avatar of AnnetteDavid

ASKER

Thank you so much, so simple when I look at it like this, thanks again