Dim MyRst As Recordset
Set dbDatabase = CurrentDb 'CreateDatabase(sNewDBPathAndName, dbLangGeneral, dbEncrypt)
Set MyRst = dbDatabase.OpenRecordset("select * from NewInvoice")
Dim x, y As Variant
y = 2 ' 1 - headers
While y < 240
'MsgBox y, vbApplicationModal
MyRst.AddNew
MyRst![Job] = WS.Cells(y, 2)
'.
'.
'.
'.
'.
'.
MyRst![TotalCost] = WS.Cells(y, 14)
MyRst.Update
y = y + 1
Wend
MyRst.Close
Set dbDatabase = Nothing
Time2 = Timer()
MsgBox "New .MDB Created - '" & sNewDBPathAndName & "'=" & y & " records", vbInformation
MsgBox Time2 - Time |