Eliminating Decimal in amount field

C

Chris

Subject: Re: Leading Zeros New Post
From: "Chris" <[email protected]> Sent:
10/14/2003 11:42:40 AM




Great thanks for the info. On the second part though I
can't round the decimals I need to actually keep the
numbers after the decimals but just get rid of the
decimal. Any suggestions?

-Chris
-----Original Message-----
Create a query into this table.
Type this in to the Field row:
NewName: Format([SomeField], "0000000")

The expression will presnt the values with leading zeros, and with any
decimals rounded off.

Use TransferText to export the query to a text file with the leading zeros.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Chris said:
I need to add leading zeroes to an amount field in a
query. Some of the amounts are longer than others. The
field length needs to be 7 characters.

With some fields longer than others how do I get the query
to determine how many zeros to add?

Also this is eventually going to be converted to a text
file for programming purposes. Is there an easy way to get
rid of the decimal point in the amount field as well?

Thanks for your help :blush:)

-Chris


.
..
 
J

Jeff Boyce

Chris

Consider using the Format() function to display the number without decimals.

Good luck

Jeff Boyce
<Access MVP>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top