Hello, all:
I have a problem like this:
I created a database in txt.like this:
"143483",12 34
"143484",12 35
"143485",55 88
"143486",58 76
"143488",85 68
"143487",87 56
.......
I want to make a program which can search the data and read out the data using VB.
If I input the 143483 into the program, the result will be 1234.
I programmed like this:
Private Sub Command1_Click( )
Dim Target As String
Dim Current As String
Open "E:\test1.t xt" For Input As #1
Do While Not EOF(1)
Line Input #1, Current
If (Current = Target) Then
Label3.Enabled = True
Text2.Enabled = True
Text2.Text = Barcode.Width
Exit Do
ElseIf (Current <> Target) Then
Do Until EOF(1)
Loop
End Sub
But it is not working. Hope someone can help me to slove this problem. thanksssss a lot!
I have a problem like this:
I created a database in txt.like this:
"143483",12 34
"143484",12 35
"143485",55 88
"143486",58 76
"143488",85 68
"143487",87 56
.......
I want to make a program which can search the data and read out the data using VB.
If I input the 143483 into the program, the result will be 1234.
I programmed like this:
Private Sub Command1_Click( )
Dim Target As String
Dim Current As String
Open "E:\test1.t xt" For Input As #1
Do While Not EOF(1)
Line Input #1, Current
If (Current = Target) Then
Label3.Enabled = True
Text2.Enabled = True
Text2.Text = Barcode.Width
Exit Do
ElseIf (Current <> Target) Then
Do Until EOF(1)
Loop
End Sub
But it is not working. Hope someone can help me to slove this problem. thanksssss a lot!
Comment