Dim DbsDBase As Database        'Declare the database variable
    Dim RstDBase As Recordset       'Declare the recordset variable




Private Sub EditDBF_Click()

    RstDBase.edit                           ' Set recordset as editable
    MsgBox (RstDBase.fields("COMPONENTI")) ' = Text1.Text ' = "I live here"      ' Change a field
    'you can use a field number, instead of "Address", is you want)
    RstDBase.Update                         ' Post changes to table.

End Sub

Private Sub Form_Load()


    Set DbsDBase = OpenDatabase("E:\IMAC", False, False, "dBASE III;")  '  Set the database to the folder/directory where
        
    '  the DBF files you want are stored.
        
    ' The options for the type of tables are
        
    ' "dBASE III;" or "dBASE IV;" or "dBASE 5.0;"
        
    ' If your going to only be reading/writing to an existing
        
    ' set of files, then you may as well use Dbase 5.
        
    ' only if your going to create new files, will this become
        
    ' so important.


    Set RstDBase = DbsDBase.OpenRecordset("Tblcompo.DBF")
    ' Set the recordset to the DBF file, in the database above,that you want to use.

    'Once you have declared the database, then pretty much the rules
    'of accessing an Access Database apply, but with actual files being
    'each table.
        
        
    'You can use a select query, so you can mix DBF files, into
    'One result set (Slow, unless you have index's)

  

End Sub




Private Sub NextRecord_Click()

    RstDBase.movenext                               ' Move to next record.
   ' Text1.Text = RstDBase.fields("COMPONENTI") ' = "I live here"      ' Change a field

End Sub

Private Sub Quit_Click()
    End
End Sub
