Link to home
Start Free TrialLog in
Avatar of tty5
tty5

asked on

MS Access sort problem

I have a field that will contain unique numbers to identify an item in the following format

456.987
342.650
5.643
34.890

This field will be used to link tables with a one to many relationship.

I need the decimal places to always show the zero at the end if it applies

I would like to sort these based on the numerical values displayed in the field

I defined Field Size to Long Integer
If I define as a Number data type with a Format of ###.000 decimal places 3, entries are rounded up to the next whole number with zeros in the decimal places.
If I define as a Number data type with a Format of ###.##0 Access automatically changes it to #.000 with the same results as above.
If I define as a Number data type with a Format of  ###.### the rounding to the next whole number happens.
If I do not supply a format then only a whole number is shown even if decimal values are entered.
If I define the field as a Text data type then the sort of course is not numerically correct.

I am hoping it something simple that I am missing otherwise a work around to make this happen would be great.
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
there is also decimal type

Im confused also by your comment, I need to show the zero on the end. What do u mean by that?
Avatar of tty5
tty5

ASKER

Ah ha!  Changing the Field Size to Double seems to be doing the trick.  I'll make the changes throughout and post after I've run through them all.

The comment about the zeros was simply that the end users use all 3 decimal places for identifying the item, so I ultimately need to show all 3 decimal places with values even if was a 0 and not have the zero truncated if it was on the end of the data.
I see what u mean.  You can specify number of decimal places and format so give that a go now that you got the right datatype.