I want an insert query to run only if the record doesn't already exist.
In the attached file, the insert query starts at line 135. The relevant field is record_number (which is a key field).
I have a recordset at line 65 that looks for a record with that number (nit sure if this is a way to do it).
So, if a record already exists with a matching record_number, then don't do the insert.
Right now, I am getting a "There is an error in SQL syntax" error message, which I think is from this insert query because of the conflicting key values.
How do I do this?