Hello,
Hope you are all in good health. I am facing an unexpected issue. FE of my application is being used two locations where both locations have different encryption password for their Access BE database. I'm using following code to update password in the FE when rhe file load. First it checks if BE password is already changed or not and if it needs to be updated, it loops through all the tables and replace the old password with new one.
The code works perfectly in Access and I can password with no problem, but when I open the FE in access runtime and try run the code, it took forever to complete. To get the location of code where it stuck, I put code to log completion of every action in the code in a text file and I found that it never get passed
The code has error handler and no error displayed, just code take forever to complete. What could be the reason and to get past this.
Best Regards
Hope you are all in good health. I am facing an unexpected issue. FE of my application is being used two locations where both locations have different encryption password for their Access BE database. I'm using following code to update password in the FE when rhe file load. First it checks if BE password is already changed or not and if it needs to be updated, it loops through all the tables and replace the old password with new one.
The code works perfectly in Access and I can password with no problem, but when I open the FE in access runtime and try run the code, it took forever to complete. To get the location of code where it stuck, I put code to log completion of every action in the code in a text file and I found that it never get passed
140 .RefreshLink
line of the first table whose password needs to be updated.The code has error handler and no error displayed, just code take forever to complete. What could be the reason and to get past this.
Best Regards
Code:
70 For Each tdf In db.TableDefs
80 With tdf
90 If (.Attributes And dbAttachedTable) = dbAttachedTable Then
'it is a linked table
100 tbl = .Name
110 If Not (tbl Like "~*") Then
130 .Connect = Replace(.Connect, "PWD=" & sOldPwd, "PWD=" & sNewPwd)
140 .RefreshLink
150 End If
160 End If
170 End With
180 Next tdf
190 End If