Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting tables

Status
Not open for further replies.

Mats

Technical User
Feb 18, 2000
83
EU
Hello,

I'm trying to export the result of a query into a textfile. I keep getting the wrong results, Access rounds my number fields down to two decimals, regadless of what my fieldsize, type or decimal-properties are. On top of this access doesn't round right, 2.05 is exported as 2.0.

What am I doing wrong here?

Thanks,
Mats
 
What software are you using to view the text file? Sometimes the default data view can cause an error.

Bryan Meek
bmeek@pacbell.net
A TC in your corner gives you the personal attention you need to find the right technology solutions for your business.
 
I'm using TransferText in Acces, and Notepad to view the results. I'm currently using Access 97, I have Access 2000 at home but haven't tried it there. Could it be the result of me using a query the retrieve the data to export.

Mats
 
I'm not sure what would cause a text value to be rounded or cut. What type of properties does the field have in the table? Is it a numeric type? Access sometimes does funny things with numeric types, but I have not run into issues with a text type like you are describing. A text to text export should not cause this issue. A numeric to text export may be the cause of the issue.

Bryan Meek
bmeek@pacbell.net
A TC in your corner gives you the personal attention you need to find the right technology solutions for your business.
 
You are right that there is no problem with text types, but all numeric types (with decimals) produce this error. I have tried with double and single types, fixed and automatic decimal settings, currency type... Nothing helps... Now I have solved the problem by making every row in the table to be exported into one string with separators in another table(with just one column) that I then export. No problem here, all decimals are just like I want them in the string.

BTW, transferSpreadsheet works like it should, no rounding here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top