main logo
Subject: Re: CB and passing more than 4 parameters
Author: Bob Archer
Posted: 2002/10/24 15:33:35
 
View Entire Thread
New Search


Actually,

Rather than an Array, a parameter object may be better. COM Codebook uses this concept. Use the relation as a base class, then add property each of your parameters and the value:

oParam = createobj('Relation')
With oParam
.AddProperty('lastname', cLastName)
.AddProperty('firstname', cFirstName)
etc
ENDWITH

DoForm('FormName', oParam)

oParam = null

************
Of course, in this init of the form, you will put all the parameter values into Form properties.

This allows you to pass any number of parameters. It also allows you to add parameters if needed without having to change the dozen of places where you might call this form.

BOb


<i><font color="#663300">Is the best way to pass more than 4 parameters to another form via an array? I know I can't pass more than 4 in my doform statements.

If so, I'm not good with arrays, can someone share a simple 5 item array listing?

Thanks</font></i>


 
©2002 Bob Archer
<-- Prior Message New Search Next Message -->