I am looking for the code to extract just one record from my file and print to a Form. Spent two days on the net but can not find the answer any where.
The code below works fine but not for a single record.
Any ideas?
Private Sub Command4_Click( )
' Sub ReadRandom()
Dim P As Person
Open "RANDOM.XXX " For Random As #1 Len = Len(P)
For i = 1 To Int(LOF(1) / Len(P))
Get #1, i, P
Print Tab(50); P.LName; Tab(60); P.FName; Tab(70); P.Age
Next
Close #1
End Sub
The code below works fine but not for a single record.
Any ideas?
Private Sub Command4_Click( )
' Sub ReadRandom()
Dim P As Person
Open "RANDOM.XXX " For Random As #1 Len = Len(P)
For i = 1 To Int(LOF(1) / Len(P))
Get #1, i, P
Print Tab(50); P.LName; Tab(60); P.FName; Tab(70); P.Age
Next
Close #1
End Sub