eric_powell
New member
- Local time
- Today, 14:50
- Joined
- Oct 2, 2009
- Messages
- 7
I REALLY, REALLY hope I'm not making a dumb mistake here. Basically, I'm doing a standard if-then statement, and the conditional expression is being falsely evaluated - or, at least, so it seems.
Here's the code:
That's not much go to on, and still left me feeling like I was crazy, but then I opened the immediate window and did this little exercise. It shows that although these variables (both doubles) seem to be equal, they don't evaluate as such. I'm wondering whether this isn't a decimal issue, but it would still be quite misleading as no decimals seem to be present.
Here's from the immediate window:
Oh, and btw, this same line of code has evaluated correctly dozens of times before. I have tried recompiling the module also.
Here's the code:
Code:
If lhs > 0 Then
If lhs <> rhs Then MsgBox "Could not reconcile the subtotal items for " & paidDate & "."
End If
Here's from the immediate window:
Code:
x = 2
?x
2
y = 2
?y
2
?x=y
True
?x>y
False
?y<x
False
?lhs
129456
?rhs
129456
?rhs=lhs
False
?lhs>rhs
True
?rhs>lhs
False
Oh, and btw, this same line of code has evaluated correctly dozens of times before. I have tried recompiling the module also.