Karen Schaefer
asked on
Format Percent within a Variable in VBA
Need to compare 2 values that are formatted on the query/table as Percent.
However, when I compare the values as variables in vba they revert back to a number.
example:
.33398.... Need to compare as 33.00% and 5.00%
.05
what do I need to do, I tried various formats without success.
format rs.fields(nTierno).value
as
Format(rs.fields(NTierNo). value), Percent, 2 decimal places....
K
However, when I compare the values as variables in vba they revert back to a number.
example:
.33398.... Need to compare as 33.00% and 5.00%
.05
what do I need to do, I tried various formats without success.
format rs.fields(nTierno).value
as
Format(rs.fields(NTierNo).
If nfld < rs.Fields(nTierNo).Value Then
Debug.Print "nTierVal:" & rs.Fields(nTierNo).Value
Debug.Print rs.Fields("TotalNetUSExp").Value
Debug.Print rs1.Fields(strfld).Value
nOvrAmt = 0
BkOvrCalc = nOvrAmt
GoTo cont:
K
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER