saving vat as 0.175

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • comcraft1966@googlemail.com

    #1

    saving vat as 0.175

    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.

    Is one way better than the other?

    Paul
  • Keith Wilby

    #2
    Re: saving vat as 0.175

    <comcraft1966@g ooglemail.comwr ote in message
    news:7ff23191-7831-4228-abc1-d2037398e227@s5 0g2000hsb.googl egroups.com...
    >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.
    >
    Is one way better than the other?
    >
    Paul
    I wouldn't have thought it would make a difference to anything except to the
    way you work out your calculated fields.

    Keith.


    Comment

    • Tony Toews [MVP]

      #3
      Re: saving vat as 0.175

      comcraft1966@go oglemail.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!jodaDisc ountAdderPercen t) 1 Then _
      Me!jodaDiscount AdderPercent = Me!jodaDiscount AdderPercent / 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

      Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

      Comment

      Working...