I am trying to create a loop for each value that looks like what I have below. However since these are calculated fields a value may be like 1.11E10. However I do not care about that because it is essentially zero to me since these are currency field. The wildcard I am using is not working and the wild card 0# does not work if a number is 1.11E10.
Code:
Do While Not rst.EOF
Select Case True
Case Not rst("Charges").Value Like 0[.]#
MsgBox "Out of balance in Charges in " & rst("[Codes]").Value & " by " & rst("Charges").Value
rst.Close
Set rst = Nothing
Set db = Nothing
Exit Function
Case Not rst("Payments").Value Like 0[.]#
MsgBox "Out of balance in Payments in " & rst("[Codes]").Value & " by " & rst("Payments").Value
rst.Close
Set rst = Nothing
Set db = Nothing
Exit Function
Case Not rst("Count").Value Like 0[.]#
MsgBox "Out of balance in Overall in " & rst("[Codes]").Value & " by " & rst("Overall").Value
rst.Close
Set rst = Nothing
Set db = Nothing
Exit Function
End Select
Loop