From: Roger on
On Mar 12, 6:23 pm, Mat <matthew....(a)optusnet.com.au> wrote:
> > Hi Mat,
>
> > I have been puzzling on your problem for som time to try to understand
> > what you are aiming for.
> > I think I miss some point, because I can not translate it to some
> > practical situation that I use.
> > Why you want or need instances of a form, while you can open a form
> > with DoCmd.OpenForm?
>
> > HBInc.
>
> Honest answer. All the 'books' talk about opening instances of a form.
> I don't think it is necessary to do this for nearly any application
> other than developer preference. Anyone else got a good reason for
> opening multiple instances of a form?

if I had a CRM, and I have a business form, and I want to open two
businesses, side by side, for comparison or copy/paste

docmd.openForm "frmBusiness"

will only open the form once
From: David W. Fenton on
Mat <matthew.kay(a)optusnet.com.au> wrote in
news:5d44b676-3ea0-4f3f-b078-3f1e189ed908(a)u5g2000prd.googlegroups.com
:

> All the 'books' talk about opening instances of a form.
> I don't think it is necessary to do this for nearly any
> application other than developer preference. Anyone else got a
> good reason for opening multiple instances of a form?

I use it very extensively in several of my apps. Here are two
examples:

1. in one, there's a main inventory form (for an antiquarian music
dealer), and it's quite commonly necessary to compare one item to
another (they have very few items in inventory that are not unique,
but it helps to be able to compare, say, the first edition of
Leopold Mozart's "Treatise on Playing the Violin" to the third
edition).

2. my weekend project is to finally implement a form appearance
management system in full. For the "choose your color scheme" form,
I'm using multiple instances of a single example form to show the
results of choosing a particular set of colors. For now, I'm
allowing for 4 distinct color schemes (I like having color
distinctions between areas of an app while otherwise keeping form
layouts very similar; the layout makes it easy to find things, the
color distinctions make it easy to get your bearings). If I didn't
using multiple instances of the same form, I'd have to save copies
of the example form for however many I wanted to support. That's not
that big a deal, but if you decide you want to change the layout of
the example forms, or add more attributes that you are controlling
with the color scheme/appearance, you'd have to edit all the saved
copies of the form. With multiple instances of a single form, you
edit the one form, and all instances inherit those changes. Example
of what I'm working on here:

http://dfenton.com/DFA/examples/MultipleInstancesColor.png

I've used it elsewhere, too.

One area in which I use it implicitly is in my standard duplicate
resolution interface, where I have two identical subforms in a
parent form. In that case, I'm not managing the two instances --
Access is doing it with subforms. In cases where you only need 2
instances and the forms are not huge and the purpose is comparison
between two records, this is likely a much easier way to implement
it. Here's an example of the first one of those I implemented:

http://dfenton.com/DFA/examples/DuplicateResolution.png

That concept works extremely well, and I use it in a lot of
different apps.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
From: paii, Ron on
Do some searching on Access sites. Someone had an example of a booking
application using objects to open forms allowing the user to move customers
from one booking to another. I looked in my saved links but could not find
it.

"Mat" <matthew.kay(a)optusnet.com.au> wrote in message
news:99109481-010f-4d07-90cd-eccc94b891b6(a)c34g2000pri.googlegroups.com...
> Hi all,
>
> When opening a form there appears to me to be two ways to do so:
>
> Option 1:
> docmd.openform "Form1"
>
> Option 2:
> dim frm as Form
> set frm = New Form1
>
>
> OK so my question is: Can I combine the two options?
> dim frm as Form
> docmd.OpenForm strFormName
> set frm = Forms(Forms.Count-1) 'the newest form created
>
> The reason I don't think I can is because when I use option1 I can
> click design view on the form but when I use option 2 design view is
> disabled.
>
> I want to combine the two options because using option 1 I can open a
> form via a string whereas using option 2 I have to specify which form
> I want to create an instance of.


From: Mat on
On Mar 15, 11:46 pm, "paii, Ron" <n...(a)no.com> wrote:
> Do some searching on Access sites. Someone had an example of a booking
> application using objects to open forms allowing the user to move customers
> from one booking to another. I looked in my saved links but could not find
> it.

Ultimately whether you find a use or not comes down to need, time and
imagination.
First  |  Prev  | 
Pages: 1 2 3
Prev: Reassigning numbers
Next: Returning Only Blank Values