set value in form is rounding

sammers101

Registered User.
Local time
Today, 11:40
Joined
May 11, 2012
Messages
89
I'm using a modified northwind inventory database

I have an order, with order detail line items
eg. Order1->product1 $10
->product2 $20

Using an after update event, I use setProperty to set ProfitPrice equal to ProfitPriceTemp. Most of the time it works, but when the temp value=0.38915 profitPrice is being set to 0.38920
I've tried adjusting the decimal places but that didn't seem to work

It's really stupid but basically its a really round about way of doing a check, to see if a value is correct. If temp=current good, if not it displays !!!!!
I could also perhaps instead do the check upon exiting, but I couldn't figure out how to do that. I wasn't sure how to reference orderlinedetails since its inside orderdetail. Then again I might still have the problem even if I did that.

I attached a condensed version, any help would be appreciated.
 

Attachments

I can't look at the attachment right now, but what is the data type of the field? Currency only takes 4 decimals if memory serves.
 
It is currency. Should I round the temp value instead? I'd rather not round if I could avoid it.
 
If you want more precision, you can change Currency to Number and then set the field size to Decimal, Single or Double.
 
Thanks a lot, I ended up changing it to number like you suggested. Even though it is currency, works good enough for me :)
 

Users who are viewing this thread

Back
Top Bottom