this is what i have so far:
'Writing to a sequential text file
Option Explicit
Dim mFileSysObj As New FileSystemObject
Dim mFile As File
Dim mTxtStream As TextStream
Private Sub cmdWrite_Click()
'Write the data to the file
Call mTxtStream.WriteLine(mskSegSocial.Text & " " & _
txtNombre.Text & " " & _
txtCalle.Text & " " & _
txtPueblo.Text & " " & _
txtCodigoPostal.Text & " " & _
txtTelefono.Text & " " & _
txtEdad.Text)
'Clear MaskEdit and TextBoxes
txtNombre.Text = " "
txtCalle.Text = " "
txtPueblo.Text = " "
txtCodigoPostal.Text = " "
txtTelefono.Text = " "
txtEdad.Text = " "
'Set several properties for mskAccount
'using With Statement
With mskSegSocial
.Text = "000000000" 'Display all zeros in MaskEdit
.SelStart = 0 'Start highlighting at position 0
.SelLength = 9 'Highlight 9 characters
.SetFocus 'Transfer focus
End With
End Sub
Private Sub Form_Terminate()
Call mTxtStream.Close 'Close the text stream
End Sub
Private Sub Form_Load()
'Create a text file
Call mFileSysObj.CreateTextFile("c:\pacientes.dat"
'Once file is created, reference the file
Set mFile = mFileSysObj.GetFile("c:\clients.dat"
'Open a text stream for writing to the file
Set mTxtStream = mFile.OpenAsTextStream(ForWriting)
'Display path in lblFileName
lblFileName.Caption = mFile.Path
End Sub
NOW: what i want to do is... to create a listbox or a text box... which prints all the Records from this clients.dat file .... I need a loop wich reads all of theese and prints them in my aplication form or (box).
Later I will want to know how to print an especific record