Beginner99
New Member
- Joined
- Dec 3, 2020
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
Dear Users,
I got into a problem and I do not how to solve the problem. I got the code below that runs a Query defined in an MS Access Database. When I run this code with the database local there is no problem. However when I put the database on a shared server the two bold lines takes an eternity to execute, especially the last one.
Can I do this in another way that reduce the time? We are taking about minutes to execute. My connection to the server is around 20mbit/s. I'm using window 10, Access 2016.
Best Regards
I got into a problem and I do not how to solve the problem. I got the code below that runs a Query defined in an MS Access Database. When I run this code with the database local there is no problem. However when I put the database on a shared server the two bold lines takes an eternity to execute, especially the last one.
Can I do this in another way that reduce the time? We are taking about minutes to execute. My connection to the server is around 20mbit/s. I'm using window 10, Access 2016.
Best Regards
VBA Code:
Dim objAccess As Object
Dim RecordSet As Object
' Open
Set objAccess = CreateObject("access.application")
objAccess.Visible = False
[B] objAccess.OpenCurrentDatabase GetDataBaseName, , Password
Set RecordSet = objAccess.CurrentDb.OpenRecordset(Query.Value, dbOpenSnapshot)[/B]