Open a Database for Make New or Update

‘VBA File handling – Make new or update existing Records
Dim dbase As DAO.Database
Dim Recset As DAO.Recordset
Set dbase = CurrentDb
Set Recset = dbase.OpenRecordset(“Table”)

‘*************************************************
‘Read the first record from the Import table and compare it with the value in the CheckList table if a match then bomb out
‘Otherwise add a record to the Checklist table
Recset.MoveFirst
Do Until Recset.EOF

Processing goes in here

Recset.AddNew

Recset.Update

Recset.MoveNext
Loop

Leave a Reply