dbTalk Databases Forums  

Opening a Form

comp.databases.ms-access comp.databases.ms-access


Discuss Opening a Form in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Roger
 
Posts: n/a

Default Re: Opening a Form - 03-12-2010 , 08:33 PM






On Mar 12, 6:23*pm, Mat <matthew.... (AT) optusnet (DOT) com.au> wrote:
Quote:
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

Reply With Quote
  #12  
Old   
David W. Fenton
 
Posts: n/a

Default Re: Opening a Form - 03-13-2010 , 01:52 PM






Mat <matthew.kay (AT) optusnet (DOT) com.au> wrote in
news:5d44b676-3ea0-4f3f-b078-3f1e189ed908 (AT) u5g2000prd (DOT) googlegroups.com
:

Quote:
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/Mult...ancesColor.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/

Reply With Quote
  #13  
Old   
paii, Ron
 
Posts: n/a

Default Re: Opening a Form - 03-15-2010 , 06:46 AM



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 (AT) optusnet (DOT) com.au> wrote

Quote:
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.

Reply With Quote
  #14  
Old   
Mat
 
Posts: n/a

Default Re: Opening a Form - 03-16-2010 , 08:11 PM



On Mar 15, 11:46*pm, "paii, Ron" <n... (AT) no (DOT) com> wrote:
Quote:
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.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.