I am comparing a db table field value from a record to a cell value
strDbField is the field name in the table
strRangeName is the cell containing the value to compare to
The Field value at the point of the comparison taking place is FALSE
The Cell value at the point of the comparison taking place is FALSE
Yet the check returns FALSE
Using the Immediates window I have testing each of the variables -
Debug.Print .Fields(strDbField) = Trim(Range(strRangeName))
False
Debug.Print .Fields(strDbField)
False
Debug.Print Trim(Range(strRangeName))
False
Unsure as to what is happening but in my world False = False = True!!!
VBA Code:
If .Fields(strDbField) = Trim(Range(strRangeName)) Then
strDbField is the field name in the table
strRangeName is the cell containing the value to compare to
The Field value at the point of the comparison taking place is FALSE
The Cell value at the point of the comparison taking place is FALSE
Yet the check returns FALSE
Using the Immediates window I have testing each of the variables -
Debug.Print .Fields(strDbField) = Trim(Range(strRangeName))
False
Debug.Print .Fields(strDbField)
False
Debug.Print Trim(Range(strRangeName))
False
Unsure as to what is happening but in my world False = False = True!!!