John W. Colby
jwcolby at colbyconsulting.com
Wed Jan 21 11:47:57 CST 2004
Charlotte,
That's true but the form still opens, all the events fire etc. So yes, you
are getting a pointer to the form class but doing so opens the form and
returns a handle to the form.
John W. Colby
www.ColbyConsulting.com
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Charlotte
Foust
Sent: Wednesday, January 21, 2004 11:34 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Instantiate Forms as Objects
Ken,
One of the problems with the "Set rFrm = New Form_Whatever" syntax is
that Form_Whatever isn't really the form object, it's the class module.
You can instantiate a module object in code using Set mdl =
Modules("Form_Whatever"), but that doesn't get you where you want to go,
and the module has to be open for that to work, just as a form has to be
open to use the Set frm = Forms("Whatever"). There is obviously some
stuff going on under the hood that MS hasn't made apparent, some
automagic manipulations in the Set frm = New Form_Whatever expression.
I'm still trying to find an old example of the approach I used.
Charlotte
-----Original Message-----
From: Ken Ismert [mailto:KIsmert at TexasSystems.com]
Sent: Tuesday, January 20, 2004 11:49 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Instantiate Forms as Objects
So, how do you get muliple instances of the same form open without using
the "Set rFrm = New Form_YourForm" syntax?
-Ken
-----Original Message-----
From: Charlotte Foust [mailto:cfoust at infostatsystems.com]
Sent: Tuesday, January 20, 2004 10:42 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Instantiate Forms as Objects
Maybe JC knows differently, but as far as I know, you can't do it that
way, which is one of the reasons I don't use that syntax.
Charlotte Foust
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com