Hello all,
i create school project but some work i not understand
i draw some items ( text , label , listview , command button )
picture show ( Page 1 )
i also create txt file who name is ( resultknowledge.txt ) and save c: Drive
picture show ( Page 2 )
i used this code open txt file in text1 ( whose visible are hidden )

Private Sub Form_Load()
filenamex = "C:\resultknowledge.txt"
Dim iFile As Long
Dim strFilename As String
Dim strTheData As String
iFile = FreeFile
Open filenamex For Input As #iFile
strTheData = StrConv(InputB(LOF(iFile), iFile), vbUnicode)
Close #iFile
Text1.Text = strTheData
End Sub

i want when form1 are run or load
First roll # show in ( label1 )
and
Second roll # show in ( label2 , label3 and label4 )

next work
when student or parents enter the roll# in textbox and click find button
i used this code Find the result and enter the result in listview1
( code working good )

Private Sub Command1_Click()
If InStr(Text1.Text, Text2.Text) > 0 Then
Text3(0).Text = Text2.Text
Text3(1).Text = "Pass"
Else
Text3(0).Text = Text2.Text
Text3(1).Text = "Fail"
End If
Call Command2_Click
End Sub

Private Sub Command2_Click()
With ListView1.ListItems.Add(, , Text2.Text)
.SubItems(1) = Text3(1).Text
.SubItems(2) = Label1(4).Caption
End With
End Sub

roll # and result show good

BUT

i want when student or parents enter the roll# in textbox and click find button
Result show in listview1
roll # Result number

number show for example First , Second and Third

how can this i used code

i also attachments pictureName:  schoolsheetp1.JPG
Views: 630
Size:  33.9 KBName:  schoolsheetpage2.JPG
Views: 842
Size:  37.2 KBName:  schoolsheet.jpg
Views: 371
Size:  41.8 KB

thinks