TransferText

  • Thread starter Thread starter georgemar
  • Start date Start date
G

georgemar

When using the TransferText method in VBA, I have a date
field that sometimes has erroneous data in it (e.g //
instaed of 1/1/04) and it imports the record alright, but
also produces a table of "paste errors".

I would like to know how to suppress this table from being
created. The data is imported ok, so I don't need to know
the error messages. Also it would mean a build up of
tables after each import.

Hope you can help.

many thanks
george
 
georgemar said:
When using the TransferText method in VBA, I have a date
field that sometimes has erroneous data in it (e.g //
instaed of 1/1/04) and it imports the record alright, but
also produces a table of "paste errors".

I would like to know how to suppress this table from being
created. The data is imported ok, so I don't need to know
the error messages. Also it would mean a build up of
tables after each import.

I'd be inclined to import the file into a special Import table in which
the field in question is defined as text, rather than as a date field.
Then after importing to that table, I'd use an append query to copy the
data from the Import table to the ultimate target table, transforming
the text field to date on the way.
 
Thank you Dirk. I'll try that.
george
-----Original Message-----


I'd be inclined to import the file into a special Import table in which
the field in question is defined as text, rather than as a date field.
Then after importing to that table, I'd use an append query to copy the
data from the Import table to the ultimate target table, transforming
the text field to date on the way.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.
 
if you're automating your import, hence the "buildup of tables" issue, you
can also automatically delete the import errors table at the same time,
using

DoCmd.DeleteObject acTable, "Put_Name_of_errors_table_here"

just use this line of code directly after the line that performs the import.

hth
 
Back
Top