Is it possible to use a sub procedure to set the connection and the use that connection somewhere else in the code? Every time i set the connection in the procedure everyrthing works fine, but the minute I try to reference the connection or return it using a function I get the error "Object invalid or no longer set". Is there a way to establish a connection and the be able to use that connection outside the sub funtion or procedure? Thanks