jtrombley24
New Member
- Joined
- Feb 21, 2016
- Messages
- 27
Wondering if anyone has experience placing an Access file on a corporate SharePoint server and using Excel as a client to interact with it. I am doing it successfully except for the connection speed. Each time I want to run a query, it takes about 5 - 10 seconds for the code to run. I'll paste a sample similar to what I was working on (the actual code is on my work computer).
Any advice? Is SharePoint not a good location for an Access file and ADO interaction? Thanks in advance!
Any advice? Is SharePoint not a good location for an Access file and ADO interaction? Thanks in advance!
Code:
Private Sub CommandButton2_Click()
Dim cn As ADODB.Connection
Dim myConn As String
Dim mySQL As String
Dim rowToUpdate As Variant
Dim changeField1 As String
rowToUpdate = TextBox1.Text
changeField1 = TextBox2.Text
mySQL = "UPDATE Table1 SET Field1='" & changeField1 & "' WHERE ID=" & rowToUpdate & ";"
myConn = "C:\Users\me\Desktop\Office Programs\ADO Study\ADOStudy.accdb"
Set cn = New ADODB.Connection
With cn
.Provider = "Microsoft.ACE.OLEDB.12.0"
.Open myConn
.Execute mySQL
End With
cn.Close
Set cn = Nothing
Unload Me
End Sub