> 2. If the form is not currently open, this type of reference will load a
> hidden instance of it, which is usually not the desired behavior.
>> 1. If there might be more than one instance of the form loaded, you don't
>> know which instance's procedure will be called, and
>
> This is still an issue when you refer to the form via the forms
> collection, isn't it?
No, because there can only be one named instance of the form in the Forms
collection. Any other, non-default instance can only be referred to via an
object variable that has been set to point to it. So a reference via
Forms!FormName always refers to the default instance.
>> 2. If the form is not currently open, this type of reference will load a
>> hidden instance of it, which is usually not the desired behavior.
>
> The OP sounds like he _knows_ the form is open.
True, and in such a case, and when there will only be one instance open, the
class-module reference is fine. I just worry about inexperienced people
getting in the habit of using that method without understanding its
ramifications.
> I suppose it depends who's writing the code. I use that direct notation
> (my terminology) quite a bit, without problems.
Of course. I'm not worried about *you*. :-)

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Stuart McCall - 23 Mar 2008 05:18 GMT
>>> 1. If there might be more than one instance of the form loaded, you
>>> don't know which instance's procedure will be called, and
[quoted text clipped - 6 lines]
> an object variable that has been set to point to it. So a reference via
> Forms!FormName always refers to the default instance.
Well I learned something there. I must confess to never having employed the
multiple instance technique, so I didn't know any of that. (I know, I need
to get out more <g>).
>>> 2. If the form is not currently open, this type of reference will load a
>>> hidden instance of it, which is usually not the desired behavior.
[quoted text clipped - 5 lines]
> people getting in the habit of using that method without understanding its
> ramifications.
I understand and agree. If ever I mention this again I'll be sure to provide
a warning too. Thanks for setting me straight.
>> I suppose it depends who's writing the code. I use that direct notation
>> (my terminology) quite a bit, without problems.
>
> Of course. I'm not worried about *you*. :-)
Well uh, thanks <blush>.