>Ok I understand, but I have a problem as I am working with sql server 2008 at the time of saving the data, I do it in several tables and for this reason many objects and recordset until I get to where I give the commit or endtrans for the same reason of those methods return 1 or 0 depending on whether it is correct or incorrect, then those returns I think can not be inside the try..catch block
Right, so that's why I mentioned clean exit. Just signal to yourself that something's wrong, rollback the transaction, then close the form. The try-catch block should only isolate the error and create the signal.