Remove decimal place in column when exporting data to text file in MS Access

Hi All,

I have the following Query output from some tables:

A01         10          0
B01          9.98      10
C01          99.99     11

When exporting the Query in Access using the Saved Exports function (External Data > Saved Exports) or manually exporting the data to a text file, the resulting text file looks like this:

A01         10          0.00
B01          9.98      10.00
C01          99.99     11.00

I want the QTY to show integers, which is the output shown in the Access SQL Query Output. It looks fine within Access but not in the exported text file.

Any ideas how to ensure the QTY only shows integers eg 0, 10 etc...

Thanks in advance.
Who is Participating?
I tried replicating your problem with a table that had the data you gave and exporting a query from that table but I was unable to get the same result.  If you could upload a stripped down version your database that exhibits this problem, then that could help.
The data type of your QTY field is set to Number in the table but its field size probably set to Single, Double, or Decimal.  Change that to Byte, Integer, or Long.  Byte is fine if you don't expect your quantities to go above 255.  Integer is okay up to 32,767.  Long is much greater still.
eeclintAuthor Commented:
Thanks for your response.

Data Type: Number
Field Size: Integer
Decimal Places: 0

Any other thoughts?

Thanks again.
eeclintAuthor Commented:
Thanks for your response.

Your thoughts gave me an idea. I deleted the Specification & recreated a new one & voilà  everything worked.

I appreciate the pointers.

Thanks again for your help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.