Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

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
0
AnnetteDavid
Asked:
AnnetteDavid
1 Solution
 
rockiroadsCommented:
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

0
 
peter57rCommented:
You will have to modify what you do.
Instead of exporting the table, export a query based on the table.
In your macro, use the query name as the source but leave everything else unchanged (it must still say Table as the objectType)
0
 
AnnetteDavidAuthor Commented:
Thank you so much, so simple when I look at it like this, thanks again
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now