Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rowsource
Message
De
28/08/1998 15:32:46
Steve Ramsower
Alliant Insurance Sevices, Inc.
Californie, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00131121
Message ID:
00131152
Vues:
11
>>>How can you successfully have a combobox with a rowsource & alias not give errors upon opening of the form.Looks like I need to have the file open b4 the form is executed.
>>
>>Hey Tim,
>>You can have the table open but that won't work if the form has a private datasession. You have a couple options:
>>- Add the table to the data environment.
>>- Open the table in the Load method.
>>
>>You cannot use the Init method because the objects are already created before it runs.
>So now I know. Why not put all init-like things into the load section?
>Thanks.

The benefit of the Init method is that all the form objects have already been created but not displayed. So in the Form.Init you can adjust their properties or default values before they are displayed.

Sometimes I will base a data-bound control on a parameterized view stored in the database that is opened in the DataEnvironment. I set its NoDataOnLoad property to True.
Then, the first line of the Init method is a Parameters (or LParameters) statement that sets memory valiables for the parameterized view.
Finally, the Init method issues a Requery(viewname) to refresh the view - and the control based on parameters passed to the form.
eg. Do form test.scx with p1, p2 ...

Take care,
Steve
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform