Run-time error 3343 - Is there a solution

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?

NY6myBp
NY6myBp
I have the following references:
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,
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hello smartpat19,

What version of Windows are you using?
What is the error message?
 
Upvote 0
Hello smartpat19,

What version of Windows are you using?
What is the error message?

I am running windows 10, 64-bit

The error Message is: "Run-time error: '3443': Unrecognized database format "M:\Development\TEAM MANAGEMENT\Access\Development Team.accdb"
 
Upvote 0
DAO3.6 doesn't work with accdb file formats since it predates them. You need the Microsoft Office 16.0 Access Database Engine object library reference.
 
Upvote 0
Additionally, how would i go about adding the entire row of values to each field?

Is the best option to create ranges?

or is there a simpler option?
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top