>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement