dcsimg
Results 1 to 8 of 8

Thread: Make this project but i do know how can this help me

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2013
    Posts
    106

    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 pictureName:  schoolsheetp1.JPG
Views: 163
Size:  33.9 KBName:  schoolsheetpage2.JPG
Views: 158
Size:  37.2 KBName:  schoolsheet.jpg
Views: 158
Size:  41.8 KB

    thinks

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Sep 2013
    Posts
    106

    Re: Make this project but i do know how can this help me

    no body help or no body know code

  3. #3
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    12,424

    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.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Sep 2013
    Posts
    106

    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

  5. #5
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    12,424

    Re: Make this project but i do know how can this help me

    Quote Originally Posted by kako0000000 View Post
    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

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Sep 2013
    Posts
    106

    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

  7. #7
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    12,424

    Re: Make this project but i do know how can this help me

    No idea what you are trying to ask.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Sep 2013
    Posts
    106

    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
  •  



Featured


Click Here to Expand Forum to Full Width