Don't want it to round

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
 
J

Jeff Boyce

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
 
J

John W. Vinson

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).
 
M

MartyO

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
 
M

Mike Painter

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top