Re: Multiple instances of a form that has a subform

From: Dan Artuso (dartuso_at_NSpagepearls.com)
Date: 01/03/05


Date: Sun, 2 Jan 2005 21:59:49 -0500

Hi,
As well, please read the sample code again from the link I posted.
You will see that the form variable is declared in the 'Declarations' section
therefore it stays in scope after the sub or function executes.

--
HTH
Dan Artuso, Access MVP
"Jose Nuñez" <josenunez70@hotmail.com> wrote in message news:esa#12S8EHA.4028@TK2MSFTNGP15.phx.gbl...
> I've a simple test on the Microsoft's database sample
> ("NorthwindReports.mdb").
>
> I write the following simple function:
>
>     Public Function MULTIPLE()
>     Dim FRM01 As Form
>
>     Set FRM01 = New Form_Orders
>     FRM01.SetFocus
>
>     End Function
>
> I call this function from a macro. The form is shown just an instant and
> it's closed.
>
> Regards.
> José Nuñez
>
>
>
> "Dan Artuso" <dartuso@NSpagepearls.com> wrote in message
> news:%23Mom3hS8EHA.1452@TK2MSFTNGP11.phx.gbl...
> > Hi,
> > I can't reproduce that behavior.
> > I tried it with a form that contains a subform and it works as expected.
> > The behavior you describe *sounds like* your form variable going out of
> scope.
> > Is that possible?
> >
> > --
> > HTH
> > Dan Artuso, Access MVP
> >
> >
> > "Jose Nuñez" <josenunez70@hotmail.com> wrote in message
> news:eArbbcR8EHA.3820@TK2MSFTNGP11.phx.gbl...
> > > This is right to work with forms that haven't a subform. But, if the
> form
> > > has a subform the form is opened and then closed quikly.
> > >
> > > Regards.
> > > José Nuñez
> > > Montevideo
> > >
> > >
> > > "Dan Artuso" <dartuso@NSpagepearls.com> wrote in message
> > > news:%23%23jGhVQ8EHA.824@TK2MSFTNGP11.phx.gbl...
> > > > Hi,
> > > > This will show you how:
> > > > http://support.microsoft.com/?kbid=210248
> > > >
> > > > However, if you need to keep track of the instances, you will have to
> > > > implement a collection of these objects perhaps using the caption
> > > > (which you would make unique when you create the instance)
> > > > as an identifier.
> > > >
> > > > --
> > > > HTH
> > > > Dan Artuso, Access MVP
> > > >
> > > >
> > > > "Jose Nuñez" <josenunez70@hotmail.com> wrote in message
> > > news:eot090P8EHA.2572@tk2msftngp13.phx.gbl...
> > > > > Is it possible to open multiple instances of a form which have a
> > > subform?
> > > > >
> > > > > For example, I tried to open multiple instances of the form Orders
> in
> > > the
> > > > > Northwind database and it was not possible.
> > > > >
> > > > > Thanks.
> > > > > Regards.
> > > > > José Nuñez
> > > > > Montevideo
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: Disembodied dropdown list of ComboBox
    ... Requery may help as well. ... > Dan Artuso, Access MVP ... >> I have a command button on the footer of a subform that can delete a record ... >> the buttons of the subform footer because the subform's AllowAdditions ...
    (microsoft.public.access.formscoding)
  • Re: Disembodied dropdown list of ComboBox
    ... Requery may help as well. ... > Dan Artuso, Access MVP ... >> I have a command button on the footer of a subform that can delete a record ... >> the buttons of the subform footer because the subform's AllowAdditions ...
    (microsoft.public.access.forms)
  • Re: Disembodied dropdown list of ComboBox
    ... Requery may help as well. ... > Dan Artuso, Access MVP ... >> I have a command button on the footer of a subform that can delete a record ... >> the buttons of the subform footer because the subform's AllowAdditions ...
    (microsoft.public.access.gettingstarted)
  • Re: subforms
    ... Your sample code has two different names there: I would think you'd want the ... Doug Steele, Microsoft Access MVP ... I want the subform to display according to what is selected in the ... Private Sub choice1_AfterUpdate ...
    (microsoft.public.access.modulesdaovba)
  • Re: Subform cycling
    ... Would that method allow for a user to later edit the record ... >> cycles the ... >> records on the subform. ... >you want to pursue this approach, I have sample code to ...
    (microsoft.public.access.forms)