Information générale
Catégorie:
Codage, syntaxe et commandes
Because your oApp object is neither the form, nor contained in the form, you need to explicitly refer to the form by name.
FormName.myfield
or, if the form is the active form,
Screen.ActiveForm.myfield
On the other hand, personally, I'd put form validation code in the form.
Alan
>Nuno, thanks for your reply.
>
>I dont follow what you suggest.
>I have an Application Object ,based on a a Container class, which has a number of Methods, one of which is to Validate fields from my form.
>So within the Validate Method of my Oapp class, I want to refer to fields on the form:
>What is the correct way to do this:
>oApp.ThisForm.Myfield or
>This.Myfiled or
>thisForm.MyField ....
>
>I am just confused as to how to refer to the form properties from within my application class.
>
>Regards,
>
>Gerard
>
>
>
>
>
>
>>Gerald
>> That is the BaseClass of the compoment ?
>>
>> Try Setting
>> This.Myproperty = 'Abc' .....
>> or
>> This.Parent.Myproperty = 'Abc' .....
>>
>> The error that gives you is because the primary object of the class is not a Form ( maybe a Container / Custom ...).
>>
>>Nuno Brito
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