for some reason this if statement never returns true and builds the sql statement and i can't for the life of me work out why
background to this is importing a load of updated data using transferspeadsheet replacing current table which has been renamed
it then should fire up a load comparisons which all work apart from in the case of a description being added where there wasn't one before. neither of these statements casue an entry in that situation any ideas why?
background to this is importing a load of updated data using transferspeadsheet replacing current table which has been renamed
it then should fire up a load comparisons which all work apart from in the case of a description being added where there wasn't one before. neither of these statements casue an entry in that situation any ideas why?
Code:
'if matching records are found check for same quantity fitted if not build sql as appropriate
If tblA.Fields(field2) <> tblB.Fields(field2) Then
strSQL = "INSERT INTO " & tblout & " (EquipmentTag, Change, Description) VALUES (" & Chr(34) & tblA.Fields(field1) & Chr(34) & ", 'Description changed', '" & tblB.Fields(field2) & "');"
End If
If tblA.Fields(field2) = "" And tblB.Fields(field2) <> "" Then
strSQL = "INSERT INTO " & tblout & " (EquipmentTag, Change, Description) VALUES (" & Chr(34) & tblA.Fields(field1) & Chr(34) & ", 'Description added', '" & tblB.Fields(field2) & "');"
End If