co**********@googlemail.com wrote:
>I have always stored VAT as a double as 0.175 out of habit. An Access
application written by another developer stored it as a double but
stored the value 17.5.
I would've stored it as 0.175 assuming that is 17.5%. That means that all
calculations will work as is. The display can be done using a percentage format so
that works.
Now what happens is users will enter, understandably, 17.5. So in the control's
AfterUpdate event I put the following code.
If Abs(Me!jodaDiscountAdderPercent) 1 Then _
Me!jodaDiscountAdderPercent = Me!jodaDiscountAdderPercent / 100
Note that this assumes the user will never have percentages greater than 100%. After
all if the user puts in 1.25 meaning 125% then it will get reduced to 1.25% which is
not at all what they meant.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog -
http://msmvps.com/blogs/access/