Forum Discussion
MS Access Stored on a Cloud
- Nov 22, 2020
We found a solution for our problem:
We used the Application.CurrentProject.Path to get the file location and then added the path to the sub folder with the DB file.
Then we used- Set dbs = CurrentDb()
and for each table we did:
dbs.TableDefs(strTable).Connect = ";DATABASE=" & LnkDataBase
dbs.TableDefs(strTable).RefreshLinkFull solution:
Dim LnkDataBase As String LnkDataBase = Application.CurrentProject.Path & "\rest of path\DB.accdb" Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim strTable As String Set dbs = CurrentDb() For Each tdf In dbs.TableDefs If Len(tdf.Connect) > 1 Then 'Only relink linked tables If tdf.Connect <> ";DATABASE=" & LnkDataBase Then 'only relink tables if the are not linked right If Left(tdf.Connect, 4) <> "ODBC" Then 'Don't want to relink any ODBC tables strTable = tdf.Name dbs.TableDefs(strTable).Connect = ";DATABASE=" & LnkDataBase dbs.TableDefs(strTable).RefreshLink End If End If End If Next tdf
It appeares it solved it.
One solution would be to migrate the data to Azure SQL and relink your front-end to the Azure instance. Then you can distribute the front-end to your users and they have nothing to do but use it.
What about using Citrix, Terminal Services?
hank you for your help but Unfortunately this is a semi-government organization, we have strict information Security Protocol.
For some reason saving files in OneDrive was cleared as fine, but we can't use Azure SQL or similar