B
boris
table record counts updates only if i switch between design and open.
It does the same to the form.
Please, help to upgrade every time new record is addeded
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim xlApp As Excel.Application
Dim xlWbk As Excel.Workbook
Dim xlSht As Excel.Worksheet
Set xlWbk = Excel.Workbooks.Open("C:\Documents and Settings\Boris\My
Documents\results.xls", ReadOnly:=True)
Set xlSht = xlWbk.Worksheets("results")
Set db = CurrentDb
Set rs = db.OpenRecordset("results")
With rs
.AddNew
.Fields(0) = xlSht.Range("A2")
.Fields(1) = xlSht.Range("B2")
.Update
.Close
End With
Set xlSht = Nothing
Set xlWbk = Nothing
Set xlApp = Nothing
Set rs = Nothing
Set db = Nothing
Else
It does the same to the form.
Please, help to upgrade every time new record is addeded
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim xlApp As Excel.Application
Dim xlWbk As Excel.Workbook
Dim xlSht As Excel.Worksheet
Set xlWbk = Excel.Workbooks.Open("C:\Documents and Settings\Boris\My
Documents\results.xls", ReadOnly:=True)
Set xlSht = xlWbk.Worksheets("results")
Set db = CurrentDb
Set rs = db.OpenRecordset("results")
With rs
.AddNew
.Fields(0) = xlSht.Range("A2")
.Fields(1) = xlSht.Range("B2")
.Update
.Close
End With
Set xlSht = Nothing
Set xlWbk = Nothing
Set xlApp = Nothing
Set rs = Nothing
Set db = Nothing
Else