PJW
03-28-2009, 08:45 AM
I have a very simple macro which uses TransferText to export a query (qry_MyQuery) to a Tab Delimited text file (myfile.txt). I have used the File > Export > Advanced method to create a Specification file.
The macro then uses RunApp to run a batch file I've written which uploads myfile.txt to an ftp server.
The problem I have is that a field in qryMyQuery called [Amount] has values (e.g. 7.99). I have tried formatting these values as Number/Double or even text, but whatever I do, TransferText adds a currency symbol to the [Amount] field in the resulting myfile.txt (£7.99). The service I am using won't accept the currency symbol for [Amount].
I found http://www.access-programmers.co.uk/forums/showthread.php?t=38870 and tried entering this in the query field...
Amount: CStr(Format([AmountSource],"########.00"))
...this has no effect on the display of the number in the resulting query, as no currency symbol is displayed there anyway. But the currency symbol still appears in the txt file.
If I format the number as text it shows left-justified in the query, but still is exported as £7.99.
I just need the number to be exported, with or without quotes, e.g.:
"text" 6.49 "text"
or
"text" "6.49" "text"
Any idea how to do this?
TIA,
The macro then uses RunApp to run a batch file I've written which uploads myfile.txt to an ftp server.
The problem I have is that a field in qryMyQuery called [Amount] has values (e.g. 7.99). I have tried formatting these values as Number/Double or even text, but whatever I do, TransferText adds a currency symbol to the [Amount] field in the resulting myfile.txt (£7.99). The service I am using won't accept the currency symbol for [Amount].
I found http://www.access-programmers.co.uk/forums/showthread.php?t=38870 and tried entering this in the query field...
Amount: CStr(Format([AmountSource],"########.00"))
...this has no effect on the display of the number in the resulting query, as no currency symbol is displayed there anyway. But the currency symbol still appears in the txt file.
If I format the number as text it shows left-justified in the query, but still is exported as £7.99.
I just need the number to be exported, with or without quotes, e.g.:
"text" 6.49 "text"
or
"text" "6.49" "text"
Any idea how to do this?
TIA,