Opps! I cut&pasted a little too fast. It should read:
Then, for each form afterwards:
DIME aMyForms[ALEN(aMyForms) + 1]
aMyForms[ALEN(aMyForms)] = CREATE("MyForm")
>Well, the "name" is not really a variable, so it's not limited to any real scope. But if you're wanting to allow multiple instances, then you will need some sort of control. Usually, the form is created as a class, and instanciated into an array, such as:
>
>
>DIME aMyForms[1]
>
>aMyForms[1] = CREATE("MyForm")
>
>
>Then, for each form afterwards:
>
>
>DIME aMyForms[ALEN(aMyForms) + 1]
>aMyForms[ALEN(aMyForms) + 1] = CREATE("MyForm")
>
>
>You then use the array elements to reference each instance.
>HTH
>Mark
>
>>>When calling the form, use the NAME clause:
>>>DO FORM MyForm NAME MyForm
>>
>>Now what if the form1 is called from a menu item; and form2 is called via a command button on still another form?
>>
>>the variable in name would need to be public, no? and if the situation repeats itself (ie; the user chooses to 'duplicate' his efforts on more than one 'record' at a time) -- the public var would be over written.
>>
>>I'd like to 'check' to see if the form is open on the screen; then 'see' what 'key data' (ie: PersonNo) is on the form to check to see if it's related to the other form at all; then update or get more info from it...
>>
>>Make sense?
>>
>>Thanks!
>>-josh
"It hit an iceberg and it sank. Get over it."
Robert Ballard, dicoverer of the Titanic wreckage.