Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Testing for zero 1

Status
Not open for further replies.

leej1

Programmer
Nov 28, 2002
12
US
Hi
This should be very easy, but I can't seem to solve the problem.
I have a form with controls from a table defined as Currency (2) dec., which I perform a function to get an answer for a control from a table also defined as Currency (2) dec.
I test the answer for zero. The control on the form and in the table appears as $0.00, but the real value is .0045 for example, which won't meet the condition of zero.
Thanks leej1
 
You may try changing the format of the currency field to Fixed/Standard. It might be set to general number

________________________________________________________________________
Zameer Abdulla
Visit Me
Children are poor men's riches.
 
How are ya leej1 . . . . .
Code:
[blue]   If Int(100 * Me!TextboxName) = 0 then
      'Do this [purple]if true[/purple]
   Else
      'Do this [purple]if false[/purple]
   End If[/blue]
Note: the value [blue].0045[/blue] is truely not zero! Is it your intent to stripout values beyond the 2nd decimal place?

If so, be aware [blue]your cutting down the accuracy of calculations.[/blue]



Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top