Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: DoCmd.TransferText acImportDelim


Message #1 by "Mike" <mike.day@o...> on Mon, 22 Oct 2001 16:37:26
I am importing a csv file into a table, 

the data contains doubles, ie 27.87, if i import it using 'Get External 

Data' from the menu it works fine. if i code it :

DoCmd.TransferText acImportDelim, "", TableName, Importname, False, ""

then it rounds the numbers up and omits the decimal bit.

I have checked the data type setting in the table and it has been set to 

Double with 2 decimal places.



I cant understand why it works from the menu but not in code....any ideas??



Thanks

Message #2 by "Hannu Turunen" <hannu.x.turunen@h...> on Tue, 23 Oct 2001 08:18:02 +0300
Hi, I've same kind of problem with command

  DoCmd.TransferText acExportDelim, ,"TableName", "TextFile.txt", False

I got error message "runtime error 3027" "Cannot update. Database or object

is read-only".  I'm trying to create a tab-delimited txt file that comes

from a query whose number of columns alter every time.  In help it says

about Specification Name: "You can import.. delimited text files without

typing a specification name for this argument".

Commands SendObject and OutputTo works without errormessage.



Thanks.

Hannu



-----Original Message-----

From: Mike [mailto:mike.day@o...]

Sent: 22. lokakuuta 2001 16:37

To: Access

Subject: [access] DoCmd.TransferText acImportDelim





I am importing a csv file into a table, 

the data contains doubles, ie 27.87, if i import it using 'Get External 

Data' from the menu it works fine. if i code it :

DoCmd.TransferText acImportDelim, "", TableName, Importname, False, ""

then it rounds the numbers up and omits the decimal bit.

I have checked the data type setting in the table and it has been set to 

Double with 2 decimal places.



I cant understand why it works from the menu but not in code....any ideas??



Thanks



--

  Return to Index