Two instances of the same form?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to have two copies of the same form on my screen, each opened with a different Wherecondition. Is this possible?

Thanks
 
Opening multiple instances is easy, with the New keyword.

After that it gets tricky. You cannot apply a WhereCondition with New.
Instead, set the Filter property of the form instance after it is opened, or
in its Open event. This generally works okay for forms (though the filtering
is not reliable for reports).

If you want the instances to be independent of each other, you will need
some way to manage the lifetime of each one independently. The easiest
approach is probably to create a custom collection of the instances. Details
and sample database in this article:
Managing Multiple Instances of a Form
at:
http://allenbrowne.com/ser-35.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.
Kamil Dursun said:
Hi,

I want to have two copies of the same form on my screen, each opened with
a different Wherecondition. Is this possible?
 
Thanks Allen, I will give it a try.
Kamil

Allen Browne said:
Opening multiple instances is easy, with the New keyword.

After that it gets tricky. You cannot apply a WhereCondition with New.
Instead, set the Filter property of the form instance after it is opened, or
in its Open event. This generally works okay for forms (though the filtering
is not reliable for reports).

If you want the instances to be independent of each other, you will need
some way to manage the lifetime of each one independently. The easiest
approach is probably to create a custom collection of the instances. Details
and sample database in this article:
Managing Multiple Instances of a Form
at:
http://allenbrowne.com/ser-35.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

a different Wherecondition. Is this possible?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top