Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TransferText method syntax 2

Status
Not open for further replies.

jjjjjjj

Programmer
Nov 17, 2000
7
US
Hi, I am trying to create a VB application that will refresh the data in my Access 97 database. I am trying to use the TransferText method of the DoCmd. Does anyone know or maybe even have an example of the TranferText method using the acImportDelim transfer type?

Thank you,

Jay
 
DoCmd.TransferText acImportDelim, "YourImportSpecNameHere", "WhatYouWantToCallTheTableHere", "WhatFileIsItComingFromHere"

You should import the text one time with the import wizard, setting up the import the way you wish, and saving it. Then you just use that import spec in your TranferText statement. Jim Lunde
compugeeks@hotmail.com
Custom Application Development
 
Hi, I have a code exactly like that of Jim's. The difference is the name of the "WhatFileIsItComingFromHere" (sourcefile) changes everyday (date part of filename) while the name of "WhatYouWantToCallTheTableHere" (targetFile) stays the same. My problem is the targetfile is not refreshed/updated even when the sourcefile changes. It works only if targetfile name also changes as it creates new file but I don't to have 30-31 target files in one month. Thanks.

jodjim

 
Hi...

Alter your code to import into a Temp table (your import spec should specify import into existing table, so your not creating a new table every time)

Update your target table from the temp

Delete all records in the temp to prepare for the next import
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top