I have inherited a lot of code that is essentially like this:
dim dbs as dao.database
set dbs = currentdb()
dbs.execute "Some SQL string"
set dbs = nothing
Is there any reason not to recode it as:
currentdb().execute "some SQL string"
(I know that if I want to use .recordsaffected, currentdb().recordsaffected won't yield usable results).
Are there any benefits from recoding it, other than simplifying the code?