plain lazy

May 20th, 2010 - 03:26 am ET by Richard | Report spam
hi

Instead of Dim and Set a connection, close and set to nothing, can I just use

currentproject.connection.execute "code"

what will be the consequences and will there be a memory set somewhere? Or
should I go the long way

many thanks in advance for your help.

Richard
email Follow the discussionReplies 13 repliesReplies Make a reply

Replies

#1 Dirk Goldgar
May 20th, 2010 - 08:57 am ET | Report spam
"Richard" wrote in message
news:
hi

Instead of Dim and Set a connection, close and set to nothing, can I just
use

currentproject.connection.execute "code"

what will be the consequences and will there be a memory set somewhere? Or
should I go the long way




There should be no consequences. If you're going to use the connection more
than once in a procedure, it's better to define and set a Connection object,
but if you're only going to use it once, you don't need to.

Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

Similar topics