Click to See Complete Forum and Search --> : If then else


Juan Amore
October 11th, 2001, 01:46 PM
HELP! Anyone:)
I have the below Menu GUI created but I'm not so sure as to where to start on the vbcode.
Do I use an if then else example....
My Menu looks like this:

File
Pay ;ie Menu button
Summary;ie Menu buton
Vb GUI looks like this:
Sales Amount [ ]
Total Pay [ ]
Commission [ ]
If the Sales amount is about a certain quota;ie 500 then the sales person will not get a commission of (15%) commission + his base pay of 100.
The (15%)com + his base pay should equal his total pay to be displayed on the above GUI. If quota is not met then only the basepay will be displayed.
Thanks!

Juan Amore

Robert Moy
October 11th, 2001, 03:33 PM
Sales Amount [ ]
Total Pay [ ]
Commission [ ]
If the Sales amount is about a certain quota;ie 500 then the sales person will not get a commission of (15%) commission + his base pay of 100.
The (15%)com + his base pay should equal his total pay to be displayed on the above GUI. If quota is not met then only the basepay will be displayed.
Thanks!




'text1.text is sales
dim base_pay as single
dim Total_pay as single
base_pay=23000
If sales>=501 then
Total_pay=(val(Text1.text)*.15) + base_pay
else
Total_pay=base_pay
end if




Good Luck