Thanks Duane you have helped me find a possible solution - but it is messy
and I would welcome some "clean up" suggestions...
First some sample values - well my report (one page per customer) has a
[totalamount] on it and this could be anything from £15.00 to eg £123456.00.
I now want to split the numbers down so that I have the number of units, the
number of tens, the number of thousands etc. So that the individual numbers
can be split into separate boxes to be printed out - in the simple case above
I want the result of [tens] = 1 and [units] =5.
To get the units is easy - =Right(Int([amount]),1). (I'm not interested in
anything after the decimal, so I've converted to integer)
After that my solution is to take the 2 numbers from the right and then the
left hand most one of these ie
[hundreds]=Right(I[amount],2)
=left([hundreds]),1)
and so on - at each step taking one more from the left. This is very long
winded and I feel perhaps I should now move into VB.
Unless you have any better ideas?
MAny thanks
Duane Hookom said:
You might want to provide some sample values and expected output. I think
you can just convert the numbers to strings with Str([YourField]) and then
use Mid(). Check Help for specifics on these functions.
--
Duane Hookom
MS Access MVP
I am producing a report of prize money won, and I have a total. I now
want
to split this into units, tens, hundreds, thousands etc so that these
values
can be put in the correct place for printing on pre-printed cheques.
Thanks