[AccessD] Popup Form

jwcolby jwcolby at colbyconsulting.com
Sun Aug 5 07:57:20 CDT 2007


Rocky,

Awhile back I published a class for automatically parsing and handling
OpenArgs.  I use this in my framework and it allows me to pass in OpenArgs
in the now common format:

VarName1=VarValue1;VarName2=VarValue2;etc;etc;

The class parses the OpenArgs and places them in a collection so that the
opening form can then use the openargs without having to do its own parsing.

Since the OpenArgs class is passed in a reference to the form, the class
also looks for Openargs whose names match form properties and if found
applies the openarg(s) to the form property.  Thus you can pass in openargs
such as:

AllowEdits=True;AllowDeletes=False;AllowAdditions=False;PKID=21;etc;etc;

Notice that AllowEdits is the name of a form property.  clsOpenArgs will
automatically set AllowEdits of the form to True, AllowDeletes property to
False, and AllowAdditions to false.  It will also hold PKID in the OpenArgs
collection so that the form can use that openarg for whatever the form is
supposed to do with it (move to that PKID?).

This class works well for doing exactly what you are discussing here,
passing in specific form properties, EVEN properties that the simple
docmd.OpenForm parameters will not allow you to directly pass and best of
all just automatically applies the properties to the form.

To get the class, go to 

http://www.databaseadvisors.com/downloads.asp and download my OpenArgs demo.
It will give you the class as well as a working demo of using the class in a
form, passing in form properties etc.  The class is dead simple to use and
can be used in any form where you need to pass in openargs and use them
inside of the form, either directly in form properties or simply as values
that the form needs to use for something.

Classes are our friend.

John W. Colby
Colby Consulting
www.ColbyConsulting.com 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
Beach Access Software
Sent: Sunday, August 05, 2007 1:47 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Popup Form

 

Dear List:
 
Can a form be opened in either popup or not depending on the value of a
switch? 
 
MTIA
 
Rocky




More information about the AccessD mailing list