E
Emily Edgington
I am using Access 2000 on Windows XP. I am trying to export a query to a txt
file while maintaining the decimal places on particular fields. I have 3
fields in my query for which I want more than 2 decimals places.
I have seen many postings on this issue, and have tried the solutions to no
avail. Someone suggested adjusting the regional and language settings in
control panel. This worked, except that all of my decimal fields exported
with 5 decimals places. No good.
I’ve tried the suggestions for forcing the formatting, using Format() and/or
CStr(). For some reason, that is not working for me. I still get the same 2
decimal place results no matter what I do. When I export to xls, I get all
of the decimals I specify.
Below is my query sql. Qty, UnitPrice, and ExtAmt are the 3 fields I am
struggling with. Can anyone help?
Thanks,
Emily
SELECT tblOutput.APBU, tblOutput.VndrID, tblOutput.AddrSeq,
tblOutput.VndrNm, tblOutput.VndrAddr, tblOutput.VndrCity, tblOutput.VndrSt,
tblOutput.VndrZip, tblOutput.BU, tblOutput.BUNm, tblOutput.InvDt,
tblOutput.InvID, tblOutput.DelDt, tblOutput.OrdDt, tblOutput.Total,
tblOutput.Tax, tblOutput.Freight, tblOutput.DelAddr, tblOutput.DelCity,
tblOutput.DelSt, tblOutput.DelZip, CStr([Qty]) AS Qty4, tblOutput.ItemDescr,
tblOutput.UOM, Format(CStr([UnitPrice]),"0.00000") AS UnitPrice5,
CStr([ExtAmt]) AS ExtAmt3, tblOutput.Acct, tblOutput.Dept, tblOutput.Prod,
tblOutput.Proj, tblOutput.Origin, tblOutput.PymntMess
FROM tblOutput
ORDER BY tblOutput.APBU, tblOutput.VndrID, tblOutput.AddrSeq,
tblOutput.InvDt, tblOutput.InvID;
file while maintaining the decimal places on particular fields. I have 3
fields in my query for which I want more than 2 decimals places.
I have seen many postings on this issue, and have tried the solutions to no
avail. Someone suggested adjusting the regional and language settings in
control panel. This worked, except that all of my decimal fields exported
with 5 decimals places. No good.
I’ve tried the suggestions for forcing the formatting, using Format() and/or
CStr(). For some reason, that is not working for me. I still get the same 2
decimal place results no matter what I do. When I export to xls, I get all
of the decimals I specify.
Below is my query sql. Qty, UnitPrice, and ExtAmt are the 3 fields I am
struggling with. Can anyone help?
Thanks,
Emily
SELECT tblOutput.APBU, tblOutput.VndrID, tblOutput.AddrSeq,
tblOutput.VndrNm, tblOutput.VndrAddr, tblOutput.VndrCity, tblOutput.VndrSt,
tblOutput.VndrZip, tblOutput.BU, tblOutput.BUNm, tblOutput.InvDt,
tblOutput.InvID, tblOutput.DelDt, tblOutput.OrdDt, tblOutput.Total,
tblOutput.Tax, tblOutput.Freight, tblOutput.DelAddr, tblOutput.DelCity,
tblOutput.DelSt, tblOutput.DelZip, CStr([Qty]) AS Qty4, tblOutput.ItemDescr,
tblOutput.UOM, Format(CStr([UnitPrice]),"0.00000") AS UnitPrice5,
CStr([ExtAmt]) AS ExtAmt3, tblOutput.Acct, tblOutput.Dept, tblOutput.Prod,
tblOutput.Proj, tblOutput.Origin, tblOutput.PymntMess
FROM tblOutput
ORDER BY tblOutput.APBU, tblOutput.VndrID, tblOutput.AddrSeq,
tblOutput.InvDt, tblOutput.InvID;