I am trying to compare two numbers one is in recordset which is represented as Rate1 below. The second is in an text file I open and is represented by the "str1" string. Rate1 equals 0.029928 while the number in str1 equals .029928. The numbers are the same technically but the statement returns a False. Is there a method to trim the left zero off if it is a zero? I may be another number.
ElseIf LTrim(rst("Rate1")) = Format(Mid(str1, 15, 7) / 1000000, "!&&&&&&&")
ElseIf LTrim(rst("Rate1")) = Format(Mid(str1, 15, 7) / 1000000, "!&&&&&&&")