I would probably end up applying Insert, Update, and Delete server behaviors using triggers to replicate the IF ELSE IF statements and replace that code. Then add a recordset. This is too complex for me to do on the forums, but I could easily help with this in a premier support ticket.