smartpat19
Board Regular
- Joined
- Sep 3, 2014
- Messages
- 114
I have the following code but have not found a solution online. Has anyone figured out a solution?
or would this relate to an authentication issue from my company's server? how do I get around that?
I have the following references:
Microsoft Access 16.0 Object Library
Microsoft DAO 3.6 Object Library
Thank you,
or would this relate to an authentication issue from my company's server? how do I get around that?
Microsoft Access 16.0 Object Library
Microsoft DAO 3.6 Object Library
Code:
Sub Add_Record()
Application.ScreenUpdating = False
Dim db As database
Dim rs As DAO.Recordset
Set db = DAO.OpenDatabase("M:\Development\TEAM MANAGEMENT\Access\Development Team.accdb")
Set rs = db.OpenRecordset("Cost Schedule", dbOpenTable)
rs.AddNew
rs.Fields("Report_Name") = Range("A2").Value
rs.Fields("Project_Number") = Range("B2").Value
rs.Fields("Cost Month") = Range("C2").Value
rs.Fields("Acquisition Cost") = Range("D2").Value
rs.Fields("Hard Cost") = Range("E2").Value
rs.Update
rs.Close
db.Close
Application.ScreenUpdating = True
End Sub
Thank you,