Re: Looking for a little education on VBA code
From: Marc (mPAMpaisl_at_optusnet.com.au)
Date: 04/15/04
- Next message: Marc: "Re: Looking for a little education on VBA code"
- Previous message: Damon Heron: "Re: finding matching records"
- In reply to: Rick: "Re: Looking for a little education on VBA code"
- Next in thread: Rick: "Re: Looking for a little education on VBA code"
- Reply: Rick: "Re: Looking for a little education on VBA code"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 16 Apr 2004 08:44:12 +1000
<snip>
> On your point a), my uncertainty was based on the mechanics of duplicating
the data set. Was a duplicate table being created and then deleted, making
it temporary or was the duplicate made 'virtually' where it would never show
up in the db window.
>
> After reading your comment, I checked the db window and could not see any
new object named rs so I guess that rs is a virtual object occupying memory
space. I had assumed that the object would delete itself when the form
closed, but your comment that it needs to be closed and set to nothing makes
me wonder about my assumption. Does the rs object stay in memory until the
program closes? Or is it only until the form closes?
>
> If it is residing in memory, then how/where would I go about closing and
setting it to nothing? Would I add code to the form's Close event? Or add
another line at the end of the control's afterupdate event code? How would
that line read? Possibly ' Set rs = Null ' or ' Delete rs '?
>
> Thanks for joining this discussion and helping me out.
>
> Rick...
>
Hi
It is only created in memory, and you need first the close statement and
then the null statement. I'm not sure of the exact technical description,
but the rs is an object, not a variable. In Access and other products,
objects can have a different scope to local variables. Therefore if you are
finished with an object you need to explicitly say so.
Marc
- Next message: Marc: "Re: Looking for a little education on VBA code"
- Previous message: Damon Heron: "Re: finding matching records"
- In reply to: Rick: "Re: Looking for a little education on VBA code"
- Next in thread: Rick: "Re: Looking for a little education on VBA code"
- Reply: Rick: "Re: Looking for a little education on VBA code"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|