I have a database connected form. It has a scipt that checks to see if that forms data has already been submitted by searching thru the records for the formID number. I want the records to be deleted if found and then add new records incase the form data has been changed. I can make this work once by using the script below. Is there a short way to make it continue searching and deleting all the records that start with that form ID number instead having to copy this script 12 times (maximum number of records allowed).
var oFile = Subform1.FileName.formattedValue; var bFound = false; while(!oDB.isEOF()){ if(xfa.record.DataConnection2.FileName.value == oFile){ bFound = true; break; } oDB.next(); } if(bFound){ oDB.delete(); oDB.update(); }