[AccessD] TransferText Failling

Hale, Jim jim.hale at fleetpride.com
Mon Mar 10 16:15:00 CST 2003


Seth,
I happened to be writing a little routine to dump plan data to a text file
so the mention of your code was very timely. Thanks! several comments: If
the file doesn't exist the killfile line gives an error. I added a filexists
test. Second 
"Open strOutfile For Binary As intFileDesc" doesn't seem to work with the
Print statement. I changed binary to Append and the code works. 

I need my amount field in the text file formatted as "-####.##" but -2000.00
is printed as -2000; 2000.20 is printed as 2000.2, etc. How can this be
correctly formatted in the print statement?
Regards,
Jim Hale

-----Original Message-----
From: Seth Galitzer [mailto:sgsax at ksu.edu]
Sent: Monday, March 10, 2003 1:32 PM
To: accessd
Subject: Re: [AccessD] TransferText Failling


Rocky,

Dump TransferText like a bad prom date and use file I/O manually to
generate your text file.  You have much more control of the output and I
have NEVER had it fail on me.  I've got sample code on my website.  Look
under Downloads for "File I/O in VB".  There should be enough there to
get you started.  I'd be happy to answer any questions if you have any.

Seth

On Mon, 2003-03-10 at 12:07, Rocky Smolin - Beach Access Software wrote:
> Dear List
> 
> I'm trying to use the TransferText method of exporting a table to a comma
delimited file.  I get "Error 3027: Cannot Update.  Database or object is
read-only" when issuing:
> 
> DoCmd.TransferText acExportDelim, , "tblAddRooms", varFileName
> 
> where varFileName contains a valid path and file name.  Has anyone seen
this before? I have but can't remember why or what the fix was.
> 
> MTIA,
> 
> Rocky Smolin
> Beach Access Software
> 
> 
-- 
Seth Galitzer			sgsax at ksu.edu
Computing Specialist		http://puma.agron.ksu.edu/~sgsax
Dept. of Plant Pathology
Kansas State University

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list