Excel Client/MS Access Database Connection Speed

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!

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
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,225,761
Messages
6,186,883
Members
453,381
Latest member
CGDobyns

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