Re: Multiple Instances of a Form to second level



Yes, its similar.

You have this declaration in the General Declarations section of a standard module to manage the instances:
Public clnClient As New Collection

Now you need a similar declaration in the module of the form:
Private clnOther As New Collection
Each form instance therefore has its own dependent collection it manages.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mr B" <MrB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4576154D-C8B0-4081-AEC2-77DAD70BFC4E@xxxxxxxxxxxxxxxx
When it comes to this type of programming, I must admit that I do not have a
good an understanding as I need to. Let me be sure I understand what you are
suggesting.

I would do the same thing that your solution does, except that I would do
this one at the first form level. This would then reverence the second level
form.

Correct?

I'll have to give it a try and then I may still have questions.

Thanks for the suggestion and help.

Mr B


"Allen Browne" wrote:

Declare the collection in the General Declarations section of the first
form's module.

Each instance of this first form will be instantiated separately, and that
instance will then have its own collection.

As I said, that suggestion untested, but should work.

"Mr B" <MrB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AC188888-C768-4293-9314-39FB9C611099@xxxxxxxxxxxxxxxx
> Any insight into how you would set up the second Collection to be
> dependent
> on the first Collection would be helpful.
>
> I think I would like to try it but I just do not know how to set > something
> like this up.
>
> Mr B
>
>
> "Allen Browne" wrote:
>
>> So, you are managing multiple instances of a form as a Collection.
>>
>> Now you need to be able to create another Collection dependent on the
>> instance (so in the module of the form), and manage the items in that
>> collection. I've never set that up, but since the Collection exists in
>> the
>> module of the form, and each instance of the form is actually a class
>> instance, the secondary collection would be dependent on the instance >> of
>> the
>> main form, which was your aim.
>>
>> Either that, or just use subforms.
>>
>> "Mr B" <MrB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:4F507DE0-941F-425A-8BDC-85D31E5C79A4@xxxxxxxxxxxxxxxx
>> > Hi, Allen,
>> >
>> > Thanks for your response. I have already tested your inplementation >> > of
>> > "Managing Multiple Instances of a Form". That was very helpful. As
>> > you
>> > know we are allways pushing the limits. So, here is what I want to >> > do:
>> >
>> > I want to allow users to open multiple instances of a form. (Got >> > this
>> > to
>> > work using your code.) Now, onece that form is opened, one or >> > multiple
>> > instances of it, I want the ability of the user opening multiple
>> > instances
>> > of
>> > a second form.
>> >
>> > Here is the senerio: Let's say that you have one person who ownes
>> > multiple
>> > properties. At any one of these properties, there are multiples
>> > instances
>> > of
>> > a specific item such as water wells. Each of these water wells there
>> > can
>> > be
>> > varying data. Each must be tracked independantly. In our senerio, >> > the
>> > user
>> > would locate the owner in question. There might be a list of >> > properties
>> > owned
>> > by that owner. The user could then open one or all of the property
>> > records
>> > (our first mutilple instances of a form). When a property record is
>> > displayed, there would be a list of the water wells (or whatever) >> > that
>> > exist
>> > on that property. At this point, the user could open one or more of
>> > the
>> > water well detailed records for viewing or compairson.
>> >
>> > I hope this explains enough of what I want to do. Basically I want >> > to
>> > think
>> > through the process of being able to track which form or group of >> > forms
>> > was
>> > opened by which form of another group of forms.
>> >
>> > Thanks for you time Allen.
>> >
>> > Mr B
>> >
>> >
>> > "Allen Browne" wrote:
>> >
>> >> Are you talking about creating instances of a form that are not
>> >> dependent
>> >> on
>> >> each other?
>> >>
>> >> If so, see:
>> >> Managing Multiple Instances of a Form
>> >> at:
>> >> http://allenbrowne.com/ser-35.html
>> >>
>> >> "Mr B" <MrB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> >> news:D436016F-FD31-49E6-9CEB-2EF39A291D76@xxxxxxxxxxxxxxxx
>> >> > Does anyone have any experience attempting to allow the creation >> >> > of
>> >> > multiple
>> >> > instances of a multiple instance form.
>> >> >
>> >> > In other words, I would like to be able to have a second level of
>> >> > creating
>> >> > multiple instances of forms.
>> >> >
>> >> > Any comments and/or advice would be apprecitate.
>> >> >
>> >> > Mr B

.



Relevant Pages

  • Re: Using Recordset.State Property
    ... In this situation, you do not have multiple instances, there is only one ... If the recordset is being used for two or more distinct purposes, ... I do not have another declaration, ... >> Worked fine for me when I declared the rs as Public in a Standard Module ...
    (microsoft.public.access.formscoding)
  • Re: C99: Suggestions for style(9)
    ... M. Warner Losh schrieb: ... It is worrisome that somebody is inclined to obfuscate the code (in this case replacing multiple variables with descriptive names by a single variable with a generic name) because it is less hassle to conform to stylethis way. ... So it is very convenient to have this single assignment and its declaration at the same place. ...
    (freebsd-hackers)
  • Re: Is returning multiple values from function call a good idea?
    ... C++ doesn't have multiple values, so it's a bit hard to compare them ... Then the declaration ... could instead declar a single class object instead of two variables. ... But the assignment: ...
    (comp.lang.misc)
  • Re: rmxftmpl.h and link errors
    ... declaration in other source files in order to access the definition. ... Your problem is not multiple inclusion of a .h file in a single .cpp ... "The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ: ...
    (microsoft.public.win32.programmer.directx.graphics)

Loading