Error 3706 Microsoft Visual Basic

Asked

Viewed 770 times

0

I am making an application and when I went to program the VBA code to connect with Access Database which was my surprise gave the error:

"Error 3706 Microsoft Visual Basic"

The connection line is:

.ConnectionString = "Data Source=" & ThisWorkbook.Path & "\BD_Loja1.accdb"

Can anyone help me how to fix this mistake?

  • Post the complete line of your ConnectionString.

  • https://www.connectionstrings.com/access/

1 answer

0

It’s probably some problem with your Provider... Give us more (much more) information about the code whenever you’re going to post something in the stack to help us help you.

Search which the Provider should be used with the type of database and access version you are using. Below is an example and suggested modification of the code (remembering that you should search the ideal Preview for your case and add this reference to the project)

strProvider = "Provider= Microsoft.Jet.OLEDB.3.51;"
strDataSource = ThisWorkbook.Path
strDataBaseName = "\BD_Loja1.accdb;"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.