Hello
This is not a question on how to, but more about your expert opinion.
As you all know tables are linked using absolute path and if you change back/front-end location one needs to re-link the table manually. I have been searching around on how to do it automatically when both files are in the same directory and I did find some solutions, which were somewhat complicated.
And then I realized that I have a very simple solution. What I do is on every start of the front-end I delete all linked tables (On open event of a Main Menu form) and then create link again using something like this:
It works very well and I have been using this for my own purposes for long.
Now the question: Do you foresee any problems with this solution?
I ask this because I am planning to implement this in somebody else's project and was surprised that have never seen this simple solution offered by others elsewhere.
This is not a question on how to, but more about your expert opinion.
As you all know tables are linked using absolute path and if you change back/front-end location one needs to re-link the table manually. I have been searching around on how to do it automatically when both files are in the same directory and I did find some solutions, which were somewhat complicated.
And then I realized that I have a very simple solution. What I do is on every start of the front-end I delete all linked tables (On open event of a Main Menu form) and then create link again using something like this:
Code:
Private Sub Form_Open
Dim CurPath As String
CurPath = CurrentProject.Path
DoCmd.DeleteObject acTable, "t_table"
DoCmd.TransferDatabase acLink, "Microsoft Access", CurPath & "\BackEnd.mdb", acTable, "t_table", "t_table"
End Sub
Now the question: Do you foresee any problems with this solution?
I ask this because I am planning to implement this in somebody else's project and was surprised that have never seen this simple solution offered by others elsewhere.