Practice For Programming Using VB
Practice For Programming Using VB
PRACTICE EXERCISE
TXTIDNO
TXTNAME
CMBCOUNTRY
OPT FEMALE
OPTMALE
CMDSAVE
a. When the EmployeeID textbox loses focus, check that a value entered is always between 1000 and
2000 inclusive.
b. When the Employee Name textbox loses focus, check that the name entered is always less than or
equal to 7 characters.
c. When the Country combobox loses focus, check that the country selected in the Select Country
combo box is always Jamaica.
d. When the Save Details button is clicked, check that any one of the gender is selected compulsory
Page 1 of 2
TXTSTUIDNO
TXTSNAME
TXTTEST1
TXTTEST2
TXTTEST3
TXTTOTAL
TXTAVERAGE
CMDSAVE
CMDADD
TXTSTATUS
a. When the Total text box is clicked, add the values in Test1, Test2 and Test3 text box and display the
result in Total textbox.
b. When the Average textbox gets focus, calculate the average (Average= Total / 3). Display the result
in the average textbox.
c. When the SAVE button is clicked, set the value of Status based on the average in the Average text
box.
Average Grade
0 TO 40 C
41 TO 70 B
71 TO 100 A
Page 2 of 2