If I have a query that I have created using VBA:
dim SQL as string
dim rs as recordset
dim db as database
SQL = "SELECT ... FROM ..."
Set db = CurrentDb
Set rs = db.OpenRecordset(SQL, dbOpenDynaset)
At the end of my sub I would always do the following:
rs.close
set rs = nothing
My question is, do I need to SQL =""
or something of that like? I think my confusion originally came from the fact that I haven't used set SQL
in my code.
and if I do clear these strings, then, is there a 'best' way?