Two instances of the same form?

K

Kamil Dursun

Hi,

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

Thanks
 
A

Allen Browne

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?
 
K

Kamil Dursun

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?
 
Top