Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enter the result in a texbox
Message
From
20/09/1999 08:26:11
 
 
To
20/09/1999 08:19:27
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00266638
Message ID:
00266642
Views:
18
Salut Zetchoume,

Start by creating a new method in your form (Form|New method) named DisplayNbParts(). In that method, place your code to calculate the number of parts:
IF THISFORM.txtSexe.Value = "M" AND THISFORM.txtFamilySituation.Value = "M"
   THISFORM.txtParts.Value = 2 && Display the value in the textbox Parts
ELSE
   *-- Insert code for other values here
ENDIF
Then, put the following in the LostFocus() event of the Sexe and Family Situation textboxes: THISFORM.DisplayNbParts()

HTH
>I would like you to help me in this subject.
>
>I'm new in Visual Foxpro 5.0. I have a form with the following fields, not exhaustive :
>
>Sexe : Male or Female (M or F)
>Family situation : married, bachelor, divorced (M, B, D)
>Number of children (1, 2 , 3, ...)
>Number of parts
>
>I want to determine the number of parts after filling the three first fields.
>
>For instance :
>
>If sexe = Male and family situation = Married and number of children = 2 then the number of parts = 2
>
>I would like, after determining the number of parts, to enter the result in a texbox named PARTS.
Previous
Reply
Map
View

Click here to load this message in the networking platform