|
-
Sep 14th, 2018, 01:12 AM
#1
Thread Starter
Addicted Member
Make this project but i do know how can this help me
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 picture  
thinks
-
Sep 15th, 2018, 01:02 AM
#2
Thread Starter
Addicted Member
Re: Make this project but i do know how can this help me
no body help or no body know code
-
Sep 15th, 2018, 01:20 AM
#3
Re: Make this project but i do know how can this help me
It is hard to comprehend what your actual question is.
If I am reading it correctly then you need to either store the entire file content in memory and search through it for your matching data or read the file each time and check each piece of data to see if it matches.
Now if the file is in a suitable format you could probably use ADO and simplify things a bit but we do not know the format so that may or may not be an option.
-
Sep 15th, 2018, 07:14 AM
#4
Thread Starter
Addicted Member
Re: Make this project but i do know how can this help me
i am no using database its mean ADO i using txt file who store in own drive
-
Sep 15th, 2018, 01:19 PM
#5
Re: Make this project but i do know how can this help me
 Originally Posted by kako0000000
i am no using database its mean ADO i using txt file who store in own drive
Ado can work with text files if they are a supported format
-
Sep 16th, 2018, 07:36 AM
#6
Thread Starter
Addicted Member
Re: Make this project but i do know how can this help me
if
i add line 0ne
line two
and slip() line one and line two
when third line run
-
Sep 16th, 2018, 08:22 AM
#7
Re: Make this project but i do know how can this help me
No idea what you are trying to ask.
-
Sep 16th, 2018, 01:13 PM
#8
Thread Starter
Addicted Member
Re: Make this project but i do know how can this help me
how can explain my idea
ok no problem i explain one by one work
first i work
create txt file
first line my school name "knowledge school " ( compiler not red this line )
i written result number who first in class reward only one ( in second line )
234567
run project
compiler read when second line match this number when compiler result show this number is pass and first in class
my first work
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|