Don't want it to round

  • Thread starter Thread starter MartyO
  • Start date Start date
M

MartyO

In my code
rec!POTotalOrder = intPOTotalOrder

where intPOTotalOrder = 12.95 it ends up that
rec!POTotalOrder =13

How do I get it to NOT round?
I've tried changing the variable to Double, vs Integer vs Long etc...
nothing works
Thanks in advance!!
Marty
 
Marty

The prefix "int" implies that the variable is an integer, hence, no decimal
places.

Could you show a bit more context on where this is occuring?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
In my code
rec!POTotalOrder = intPOTotalOrder

where intPOTotalOrder = 12.95 it ends up that
rec!POTotalOrder =13

How do I get it to NOT round?
I've tried changing the variable to Double, vs Integer vs Long etc...
nothing works
Thanks in advance!!
Marty

It's probably not the variable (which should be Currency I'd guess), but
rather the datatype of POTotalOrder in the table upon which the recordset is
based. My guess is that the field is defined as a Number, Long Integer. Be
sure it's Currency (or Double or Decimal as appropriate).
 
Thank you all! I gave up too soon. After I sent the post and walked away
from it for a little while I realized my mistake that the rec!POTotalOrder
was not set right. Thanks again for the reponses!!
Marty
 
MartyO said:
Thank you all! I gave up too soon. After I sent the post and walked
away from it for a little while I realized my mistake that the
rec!POTotalOrder was not set right. Thanks again for the reponses!!
Marty
Welcome to the grand order of "Red Mark on The Forehead"

You get it when after hours of work, you ask for help here and see the
answer shortly after sending.
It comes from slapping yourself on the forehead.

Sciencedaily.com has had a few articles on the benefits that acrue from
forgetting about a problem for a while and I think that's what goes on here
a lot.
I know it did for me.
I can't remember if it was before I knew everything or retired and just
learn for fun now.
 
Back
Top