Exporting table and importing remotely

T

Toby

Hi
I have a need to export a table to some of my remote
users who will then need to import
the data to update their database. I presumed to use the
following:
DoCmd.TransferText
acExportDelim, , "tblSchedule", "C:\Out\schedule.txt"
This works fine now, but problems occur when trying to
import it. I used Importdelim, but get error 2391 Field
F1 does not exist in destination table tblSchedule.
Surely if I what I import should be same as what I
export ?
Any help to work this out would be appreciated.
Thanks
 
T

tina

you need to set up an Import Specification in the destination database, to
import the data into an existing table via a macro or VBA. do this by
running the import manually first, which will bring up the import wizard. in
the wizard, click the Advanced button. enter the correct field names and
data types from the destination table. (i usually open that table before
starting the manual import, and write that info down for reference.) if you
have a date field in the table, make any necessary adjustments in the
"Dates, Times, and Numbers" section. then click the Save As button. accept
the default specification name, or name it anything you want, and click OK.
now when you use the TransferText action in your import macro or VBA
procedure, include the name of the import specification you just built.

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top