Question : Microsoft, Access, 2007, Call sub without return

Hi

I have an if statement where, if something is true, a sub procedure is called which performs various operations and then closes the current form.  I don't want to return to the orginal procedure once the sub has been completed.  If I use Call, it returns.  How do I tell Access to go to a sub procedure and not return?  I have an idea I might need to use Function, but I don't know how to so, if that's the correct way of doing it, please could someone tell me how to use it?  If not, please could tell me someone how I call a sub without returning?

Thanks
Sarah

Answer : Microsoft, Access, 2007, Call sub without return

You cannot do so.
A procedure - whether a sub or a function- is defined as a 'temporary branch' from the current flow and will always return to the originating code.

If you want to close the form after the procedure has run then you should put the close form command immediately after the call to the sub/function in the calling procedure.
Random Solutions  
 
programming4us programming4us