M
Michel S.
Hi !
I posted a few days ago about Access (2002) process not closing in the
task list even after the application is closed.
I searched thru my entire code for unclosed
objects/recordsets/connexions/querydefs etc.. and these not set to
nothing, but at no avail.
I also looked for controls tested like " IF chkBox01 Then" instead of
specifying "If chkBox01 = True Then", but this not applies either.
(And I think this bug was in Access 97 only).
Are there some other catches like this ? For instance, if I test a
recordset EOF property, do I have to specify "If rst.EOF = True Then"
or does the for "If rst.EOF Then.." is okay ?
Also, I use many unbound (at design time) subforms for which I set the
"SourceObject" and "RecordSource" dynamically at runtime. Do I have
to reset these properties to nothing ? Do I have to specifically
close the subforms ?
Does the same applies if the "RecordSource" is a dynamically built
string containing an SQL statement ?
Another source of confusion is the use of ! instead of . to prefix
recordsets fields names. I read somewhere that this can cause Access
to not close properly. But I can't no longer find the reference.
Finally, I use some object arrays (containing class instances). Upon
exciting, I loop thru the array to set each instance to nothing, and
then I erase the array. But I also noted that if I only erase the
array without setting each element to "Nothing", the "terminate" event
of the class instance is fired too. Am I overdoing things by doing
this (set to nothing then erase) or this is a good practice ?
Any other ideas are welcome to nais down this problem.
Thanks !
I posted a few days ago about Access (2002) process not closing in the
task list even after the application is closed.
I searched thru my entire code for unclosed
objects/recordsets/connexions/querydefs etc.. and these not set to
nothing, but at no avail.
I also looked for controls tested like " IF chkBox01 Then" instead of
specifying "If chkBox01 = True Then", but this not applies either.
(And I think this bug was in Access 97 only).
Are there some other catches like this ? For instance, if I test a
recordset EOF property, do I have to specify "If rst.EOF = True Then"
or does the for "If rst.EOF Then.." is okay ?
Also, I use many unbound (at design time) subforms for which I set the
"SourceObject" and "RecordSource" dynamically at runtime. Do I have
to reset these properties to nothing ? Do I have to specifically
close the subforms ?
Does the same applies if the "RecordSource" is a dynamically built
string containing an SQL statement ?
Another source of confusion is the use of ! instead of . to prefix
recordsets fields names. I read somewhere that this can cause Access
to not close properly. But I can't no longer find the reference.
Finally, I use some object arrays (containing class instances). Upon
exciting, I loop thru the array to set each instance to nothing, and
then I erase the array. But I also noted that if I only erase the
array without setting each element to "Nothing", the "terminate" event
of the class instance is fired too. Am I overdoing things by doing
this (set to nothing then erase) or this is a good practice ?
Any other ideas are welcome to nais down this problem.
Thanks !