>Jason
>
>Thanks for your response
>
>I tried having a procedure call both formA(Maps) and FormB(Coverages) independently from a menu call. This did clean up one other problem. The problem of the class on the second form not recognizing the occurance of the first form still exists. From inside the code in the class on the secong form (Coverages) I use:
>
>called from coverages.coverprop1.populate()
>
>maps.map1.layers.add (I get an error that maps does not exist)
>
>Is it normal for a class on a form not being able to see another form that already exists? I can refer to formA(Maps) from the init of formB(Coverages)
Quinn,
Situation is different than in your original post. You try to access a method of FormA from FormB. FormB doesn't know FormA because it's not initialized yet. Still after initialization :
maps.map1...
would work only in the case its scx name is "maps.scx" and it's the first instance of that form. To overcome call formB with passing FormA's object ref :
do form formb with this
formB.init
lparameters toCaller
this.SomeObject.Value = toCaller.Somemethod
toCaller.SomeProperty.Value = toCaller.Somemethod
...
To accomodate this to your case :
*Maps.init
...
do form Coverages with this
....
*Coverages.Init
lparameters toCaller
....
toCaller.Map1.Layers.Add(layer)
Seeing the form names I guess this is MapObjects using ArcInfo coverages. This way GeoDataset and recordset would be FormB's and if it's closed FormA would error I guess. Wouldn't it be better FormB returns coverage path and FormA connects.
Cetin