Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make field in form visible only when a condition is met
Message
De
31/10/2002 10:11:02
 
 
À
31/10/2002 05:37:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00716977
Message ID:
00717330
Vues:
14
Peter,

In fact you were right. The DoDefault() ... NODEFAULT is only necessary when you address the value of a control, which was not the case here.

>Greg,
>
>You're both right. I didn't realize that the tip is with regard to the code that's generated by a wizard, which has underlying code indeed. Moreover, I mixed up dodefault() and nodefault.
>
>>Peter,
>>
>>She's right. You need the dodefault(). If you don't then you still have the values of the previous record
>>
>>
>>Better is (to avoid a second refresh)
>>
>>In the refresh of this control put
>>=dodefault()
>>this.visible = myTable.CustType="prospect"
>>NoDefault
>>
>>
>>>Nadia,
>>>
>>>I tend not to agree with DODEFAULT() in a Refresh() method, as I regard it as troublesome. Users, and even developers, only seldom notice that trouble, but behind the scene certain refreshes are sometimes done more than once and therefore too often. Have you ever noticed that effect?
>>>
>>>>>I need to make a field visible only when a condition is met in a fomr.
>>>>>I would like this to show when the record is shown in a form.
>>>>>
>>>>>Example:
>>>>>I am using the wizard control buttons for next, prev. etc..
>>>>>While scrolling through the records I want a field to show up
>>>>>if the contents ='prospect' only and not when it ='customer'
>>>>>
>>>>>Tried in all properties of CustType but it didn't work
>>>>>
>>>>>IF ThisForm.CustType.Value='prospect'
>>>>> ThisForm.CustType.Visisvle=.T.
>>>>>Else
>>>>> ThisForm.CustType.Visisvle=.F.
>>>>>ENDIF
>>>>>
>>>>>Any suggestions?
>>>>>
>>>>>Andy
>>>>
>>>>In the refresh of this control put
>>>>dodefault()
>>>>this.visible = myTable.CustType="prospect"
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform