hey guys i am builing a program "alis score". what it does is calculate your GCSE grade and give a score for that...(total subjects divide by 9). I got like max. 9 subjects in my program and consists of three form.. I have finished all the programming but i got stuck in my last form.. I DONT KNOW HOW TO SHOW ALL THE INFORMATION FROM FORM 2 IN FORM 3. I GOT 1 LIST BOX AND THREE LABELS IN FORM 3.HERES THE CODE FROM 2ND FORM.. CAN ANYONE GIVE A DETAIL CODE FOR MY THIRD FORM?????????PLZZZ
Dim newName As String '
Dim newNumber As Integer
Dim Grades(0 To 8) As String
Dim Points(0 To 8) As Integer
Dim Totalscore As Integer
Dim i As Integer
Dim choice As Integer
Dim Alisscore As Double
Private Sub cmdReturnToMenu_Click()
Close #1
frmFrontPage.Show
FrmUserDetails.Hide
End Sub
Private Sub CmdSubmit_Click()
newName = txtName.Text
newNumber = Val(txtStudentNumber.Text)
If txtStudentNumber.Text < 1000 Or txtStudentNumber.Text > 9999 Then GoTo NumberError
If List1 = List2 Or List2 = List3 Or List3 = List4 Or List4 = List5 Or List5 = List6 Or List6 = List7 Or List7 = List8 Or List8 = List9 Then GoTo Subjecterror
Write #1, newName, newNumber, List1, lstg1, List2, lstg2, List3, lstg3, List4, lstg4, List5, lstg5, List6, lstg6, List7, lstg7, List8, lstg8, List9, lstg9, lblAlisScore
txtName.Text = ""
txtStudentNumber.Text = ""
ErrorResume:
Exit Sub
NumberError:
MsgBox ("Number between 1000 and 9999")
txtStudentNumber.Text = ""
GoTo ErrorResume
Subjecterror:
MsgBox ("Same Subjects selected")
List1 = ""
List2 = ""
List3 = ""
List4 = ""
List5 = ""
List6 = ""
List7 = ""
List8 = ""
List9 = ""
GoTo ErrorResume
End Sub
Private Sub Form_Load()
Open "FileStudentNumber.txt" For Append As #1
Open "Alisscore.txt" For Input As #2
For i = 0 To 8
Input #2, Grades(i), Points(i)
lstg1.AddItem Grades(i)
lstg2.AddItem Grades(i)
lstg3.AddItem Grades(i)
lstg4.AddItem Grades(i)
lstg5.AddItem Grades(i)
lstg6.AddItem Grades(i)
lstg7.AddItem Grades(i)
lstg8.AddItem Grades(i)
lstg9.AddItem Grades(i)
Next i
Close #2
lbldate.Caption = Format(Date, "dd/mm/yyyy")
End Sub
Private Sub lstg1_Click()
choice = lstg1.ListIndex
lblp1.Caption = Points(choice)
End Sub
Private Sub lstg2_Click()
choice = lstg2.ListIndex
lblp2.Caption = Points(choice)
End Sub
Private Sub lstg3_Click()
choice = lstg3.ListIndex
lblp3.Caption = Points(choice)
End Sub
Private Sub lstg4_Click()
choice = lstg4.ListIndex
lblp4.Caption = Points(choice)
End Sub
Private Sub lstg5_Click()
choice = lstg5.ListIndex
lblp5.Caption = Points(choice)
End Sub
Private Sub lstg6_Click()
choice = lstg6.ListIndex
lblp6.Caption = Points(choice)
End Sub
Private Sub lstg7_Click()
choice = lstg7.ListIndex
lblp7.Caption = Points(choice)
End Sub
Private Sub lstg8_Click()
choice = lstg8.ListIndex
lblp8.Caption = Points(choice)
End Sub
Private Sub lstg9_Click()
choice = lstg9.ListIndex
lblp9.Caption = Points(choice)
End Sub
Private Sub Showtotal_Click()
Totalscore = Val(lblp1.Caption) + Val(lblp2.Caption) + Val(lblp3.Caption) + Val(lblp4.Caption) + Val(lblp5.Caption) + Val(lblp6.Caption) + Val(lblp7.Caption) + Val(lblp8.Caption) + Val(lblp9.Caption)
Alisscore = FormatNumber(Totalscore / 9, 1)
Showtotal.Caption = Totalscore
lblAlisScore.Caption = Alisscore
End Sub
Private Sub txtStudentNumber_KeyPress(Key As Integer)
If Key < Asc("0") Or Key > Asc("9") Then Key = 0
End Sub
Private Sub txtName_KeyPress(Key As Integer)
If InStr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", UCase(Chr$(Key))) = 0 Then Key = 0
End Sub