decimal point issue on currency

antonyx

Arsenal Supporter
Local time
Today, 19:39
Joined
Jan 7, 2005
Messages
556
ok.. this is not a hugely important issue, however.. it is a slight annoyance that i would like to resolve if it is possible..

most of my currencies will be whole numbers like twenty pounds or five pounds..

so i chose to set the decimal point to 0 which displays it like this..

£50

which is better then setting it on auto (£50.00) which my user does not like..(uneccessary zeros)

however.. every now and then there will be a carpark cost of £2.30..

if i set the decimal point to 0 then £2.30 will display as £2 which is no good..

if i set the decimal point to 1 then it will display it as £2.3 which is no good..

so is there a way to make sure that all currencies display as decimal point 0 values.. eg £34.. £2.. £145

and if a price happens to involve some pence.. such as two pounds 30 pence.. then display it as £2.30 or £103.55... etc....

i hope that is clear
 
Last edited:
Hello:

You could put the code below in the AfterUpdate event of your "Money" control:


If InStr(YourTextboxHere, ".") = 0 Then
YourTextboxHere.DecimalPlaces = "0"
Else
YourTextboxHere.DecimalPlaces = "2"
End If


Regards
Mark
 
yes that did it.. thank you
 

Users who are viewing this thread

Back
Top Bottom