I have a two buttons on a form that, when clicked, update information in two tables and potentially add or remove records to one of those tables, also. One button undoes the actions of the first button. I would like to, for reusability and for increased readability, break out each of these updates and inserts into their own functions that would be called by the button click event. My question is this: does anyone out there know if you can pass a connection to a function such that all the updates and inserts are only committed if no errors occur in any of the functions or rollbacked otherwise. In other words, the errors that could occur are that somehow a mistake could have occured earlier and trying to process with that amount would cause a negative quantity result--in other words, not database contraint errors. I have started to write out my functions and have put cn as ADODB.connection as an argument for the function, but I have questions as to whether that would actually work or not. I have questions like is ByRef necessary and do I have to instantiate the connection somehow in the called function--and if I do how do I make one commit or rollback work for all three functions and the button click event. And maybe even if just a global connection might not work better. Thank you in advance for your responses and your time.