Ok, I've quiered the table before submitting and the record is found (I've tested this with the use of a display message). However when it tries to submit I get the following error :
InfoPath cannot submit the form.
Some rules were not applied.
InfoPath cannot submit the form.
An error occurred while the form was being submitted.
The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again
I have an ID key, sitePin(Primary key). Im using the sitePin to locate the record. I know this is caused because of the primary key not being able to change but not sure how to work around it.