Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reference a form from another form
Message
De
17/04/1999 09:20:48
 
 
À
16/04/1999 18:55:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00207251
Message ID:
00209345
Vues:
18
Hi Ed,

I'll look into that. I am also going to try a private datasesson for the form?? This one is kicking my butt!

Thanks

>>Hi Ed,
>>
>>That sounds like what is happening. Do I need to use a form set or is there a way to insure that the modal form uses the same data environment?
>>
>
>I believe that a modal form using the default data session inherits the data session of its parent form. You can also explcitly pass the datasession to the child form and use SET DATASESSION TO
>
>>Thanks
>>
>>>>Hi Ed,
>>>>
>>>>I can now do everything except do a seek or a locate on the table from the form oSearch. For some reason it moves me to the end of the table like the record can't be found (it's there). Everything seems to reference the cursor when I check it but when I do a seek or locate nothing... Is this not possible from a modal form that is created on the fly??
>>>>
>>>
>>>I'm not sure what the problem is here; I'd guess that the two forms aren't sharing a common data environment, and as a result the record pointer isn't being moved properly.
>>>
>>>>Thanks
>>>>>>I am creating a form from a method in a grid with the following code
>>>>>>
>>>>>>*MyGrid.SearchForm()
>>>>>>LPARAMETER oHeader
>>>>>>oSearch = CREATEOBJECT("searchform", oHeader)
>>>>>>oSearch.Show()
>>>>>>
>>>>>>In the init of oSearch I have the following code
>>>>>>
>>>>>>*SearchForm.Init
>>>>>>PARAMETERS oHeader
>>>>>>This.Caption = "Search the " + oHeader.Caption + " Column"
>>>>>>
>>>>>>The above works fine.
>>>>>>
>>>>>>In the click of a command button on the modal form oSearch I have the following
>>>>>>
>>>>>>*SearchForm.Command1.Click
>>>>>>ThisForm.Text1.Value = oHeader.Parent.ControlSource
>>>>>>
>>>>>>When I click the command button I get the following error "Object oHeader not found".
>>>>>>
>>>>>>Why isn't oHeader visible in the command.click method?
>>>>>
>>>>>oHeader goes out of scope and disappears once the Init event completes; to make it available later, save it in a form property and use the form property to reference the object.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform