step one make sure that you add a reference to the microsoft DAO 3.6 Object Library.
Dim db as object
Dim swRecord as Recordset
set db = opendatabase(string representing location of database)
set swRecord = db.openRecordset(string representing table or query name, dbOpenDynaset)...