variable clean-up after module runs????

W

Weeble

I am new to Access and I am unsure how to clean-up my variables after I am
done with them.

Other programs I have written script for always had a way. I can find
nothing for Access.

Is this needed or am I looking for something that doesn't exist?
 
A

Arvin Meyer [MVP]

VB and VBA usually clean up after themselves. Do not count on object
variables doing that. I usually close Recordsets and set them and other
objects to "Nothing":

Exit_Here:
rst.Close
Set rst = Nothing
Set db = Nothing
Set objExcel = Nothing

as an example.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top