Hi all,
Before saving a record, I am testing 12 form fields for duplicates against all records in a table.
However, I have an issue whereby if the table field is null and the text field on the form is null, it doesn't recognise this as being equal. This is the line in question:-
So, if 11 of the 12 form fields are populated with data and they match the data in the table, it will not treat this as a duplicate record because of the null issue. If I take the above line out, the code traps the duplicate record.
Therefore, how can I tackle this null problem?
Many thanks and regards.
Before saving a record, I am testing 12 form fields for duplicates against all records in a table.
However, I have an issue whereby if the table field is null and the text field on the form is null, it doesn't recognise this as being equal. This is the line in question:-
Code:
rstDupe.Fields("FIELD1") = Me.txtFld1
So, if 11 of the 12 form fields are populated with data and they match the data in the table, it will not treat this as a duplicate record because of the null issue. If I take the above line out, the code traps the duplicate record.
Therefore, how can I tackle this null problem?
Many thanks and regards.