Transfer Databases_Part 2

Rich_Lovina

Registered User.
Local time
Today, 23:41
Joined
Feb 27, 2002
Messages
225
I'm still very new at macros, but here's the problem. I have created TOPUP table with no records, but with all fields matching the source data's table.

In Transfer Database for the destination name I have TOPUP, but the Macro creates a new table called TOPUP1, then for the 2nd transfer TOPUP11, then TOPUP2 through to TOPUP4. Why does it avoid my nicely created table?

Also, I then have queries to append all tables to TOPUP, but this query relies upon the newly created table, TOPUP2 to commence. The macro tells me it can't recognise this query, that the name is spelled wrongly, etc. Can this only work as a nested macro?

Any help very much appreciated.
 
Hi Richard,

The TransferDatabase action does not allow a user to append records to an existing table; it only copies db objects to new db objects.

What you have to do is design an append query in the db you want to import the data to using the tables and such from the db where the source data is.

So in the db where you want the data to end up, you need to design a query that looks at the data in another Access db. Do the following:

1. In the db where you want the imported data to reside, design a new query.
2. Bring up the properties sheet for the new query after closing the Show Table dialog box.
3. Change the Source Database property in the property sheet from "(current)" to the path where the data you're trying to import resides. So if the new data is in a table in "C:\UNZIPPED\NewData\Newdata.mdb", type that into the Source Database property (no quotes) of the query's property sheet.
4. Right click somewhere's in the upper half of the query design grid to Show Tables & double click on the table you want the query to run.
4. Write the new append query.
5. Run the query, see if the query works, and add it to your macro with the Open Query action.

That help?

Doug.
 
Hi Doug
Thanks greatly. I can see how this will work.
 
Are you sure that you need to use the TransferDatabase Action? The TransferText Action may work better for you.
 
Thanks Pat, I will look at that option too, it's only that the data to import comes from another Access db.
 

Users who are viewing this thread

Back
Top Bottom