[AccessD] Populating a form with attributes of a class

Jim DeMarco Jdemarco at hshhp.org
Tue Mar 25 15:00:01 CST 2003


If the string contains the library and class names he could use a string just like you would in: 
	CreateObject("Excel.Application")

or in the case of a custom object:
	CreateObject("MyLibrary.MyClassObject")

Jim DeMarco


-----Original Message-----
From: Seth Galitzer [mailto:sgsax at ksu.edu]
Sent: Tuesday, March 25, 2003 2:50 PM
To: accessd
Subject: Re: [AccessD] Populating a form with attributes of a class


Arthur,

Are you wanting to use data in an object to populate a form?  Or am I
misreading you?  AFAIK, there is no way to pass an object as a form
parameter.  You can pass a string, but that's about it.  And I don't
think you can reference an object by such a string value.  You would
need some kind of container, like a collection, for your objects, which
you could then reference by a key name.  Note this collection would need
to be global, but if you look at it like any other application-wide
collection, it's really the same thing.  The Forms or Tabledefs
collections are really nothing more that "system" global collections. 
While globals are typically considered a "bad thing" by most developers,
sometimes you can't get around them.  I think in this case, where you're
not keeping an armada of global objects available and just a single
collection, it shouldn't be too painful for you. :)

Seth

On Tue, 2003-03-25 at 09:54, Arthur Fuller wrote:
> Suppose I have a class that represents a person, a car, a network, whatever.
> What would you suggest is the best way to present the attributes of an
> instance of said class on a form? Somehow the form has to be able to see the
> object. Pass its name and then derefence it inside the form_open()? It's
> simple enough in debug.print because you can deal with the object as an
> object and just interrogate it. 
> 
> I don't want to declare a global because there could be any number of them.
> Any suggestions, you object guys?
> 
> "Prediction is difficult, especially of the future." 
> - Werner Heisenberg


-- 
Seth Galitzer			sgsax at ksu.edu
Computing Specialist		http://puma.agron.ksu.edu/~sgsax
Dept. of Plant Pathology
Kansas State University

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited.  If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message.  Thank You".
***********************************************************************************



More information about the AccessD mailing list