Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Private datasessions - calling forms
Message
De
29/07/1998 11:22:36
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00122104
Message ID:
00122324
Vues:
22
>>I think that's what I'm doing. Here's my code:
>>
>>lcAlias = thisform.DataEnvironment.InitialSelectedAlias
>>if !wexist("frmFirm")
>> oApp.doForm("firms","frmFirm")
>>endif
>>if type("frmFirm") = 'O' and !isnull(frmFirm)
>> frmFirm.lnfirmid = 0
>> frmFirm.lccompany = alltrim(&lcalias..company)
>> frmFirm.lcparent = ' '
>> frmFirm.lcultcomp = ' '
>> frmFirm.newalias = 'f_main_company'
>> frmFirm.switchviews
>> frmFirm.pageframe1.activepage = 2
>> frmFirm.show
>>endif
>>
>>I'm calling methods in the "firms" form. This code also works if the "firms" form is already open.
>>
>>paul
>
>You instanciate the form first which has no information about what firm to display data for. The controls are already bound. Then you set the information in Firms based on what was selected in Executives. Somewhere in Firms you have to execute a method to find the correct record and refresh the data in that form. I assume frmFirm.SwitchViews does not do that for you.

Reply again -

I got it. I was hoping that it was something stupid that I was doing wrong. I use a variable called lcAlias early in the method without declaring it LOCAL. I've been working under the assumption that when you don't declare them they're LOCAL. But they're PRIVATE. Duh.

Now I have to go through my app and seriously tighten up my code.

Thanks for your help.

paul
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform