mcelligott
Programmer
Hello All,
I am using Microsoft Access 2010. I have a database that is using a frontend/backend configuration. I am using the code below to relink the tables. We have two different sites on two different networks. I have user level security and am using a mdw security file. Whenever I push out a programming update to our frontend, our remote site fails to completely re-link. It sends back error 3033 after it has re-linked about a dozen tables. Whoever is logging on and attempting to do the re-link does not have permission to read, add, update or delete that table. I have to go to the remote site and use my log on in order to get things working again.
I am guessing the reason why it errors out is because the user does not have permission to access the table. I am wondering if there is a way around this. The user should never be able to see the information in that table but some individuals that work at the same workstation and have a different sign on would. I would appreciate any help anyone can give me on this.
Thanks in advance,
Bob
I am using Microsoft Access 2010. I have a database that is using a frontend/backend configuration. I am using the code below to relink the tables. We have two different sites on two different networks. I have user level security and am using a mdw security file. Whenever I push out a programming update to our frontend, our remote site fails to completely re-link. It sends back error 3033 after it has re-linked about a dozen tables. Whoever is logging on and attempting to do the re-link does not have permission to read, add, update or delete that table. I have to go to the remote site and use my log on in order to get things working again.
I am guessing the reason why it errors out is because the user does not have permission to access the table. I am wondering if there is a way around this. The user should never be able to see the information in that table but some individuals that work at the same workstation and have a different sign on would. I would appreciate any help anyone can give me on this.
Thanks in advance,
Bob
Code:
Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.
Dim strServerPath As String 'path to server
Dim strVPNPath As String 'path to ECD server via VPN connection
Dim fso 'File System Object
Dim Response As String
Set fso = CreateObject("scripting.filesystemobject")
strServerPath = "\\Ecd911\911\Database\Administrative Database\ECD Administrative Database_be.mdb"
strVPNPath = "\\10.100.89.7\database$\Administrative Database\ECD Administrative Database_be.mdb"
If fso.FileExists(strServerPath) = True Then
Call pfECDServerReLink
Else
Call pfVPNRelink
End If
DoCmd.OpenForm "Switchboard", acNormal
lastline:
End Sub
-------------------------------------------------------------------------------------------------------------
Function pfECDServerReLink()
Dim dbs As Database
Dim Tdf As TableDef
Dim Tdfs As TableDefs
Dim firsttbl As TableDef
Set dbs = CurrentDb
Set Tdfs = dbs.TableDefs
Set firsttbl = dbs.TableDefs("Administrative Policies")
'Determines if the table Administrative Policies is already connected to the ECD Server
If firsttbl.Connect = ";Database=" & "\\Ecd911\911\Database\Administrative Database\ECD Administrative Database_be.mdb" Then
GoTo lastline
End If
'Loop through the tables collection and relinks to the ECD server if not already connected
MsgBox "Reconnecting to the ECD Server, this will take a few minutes. Sorry for the inconvenience.", vbInformation
For Each Tdf In Tdfs
If Tdf.SourceTableName <> "" Then
Tdf.Connect = ";Database=" & "\\Ecd911\911\Database\Administrative Database\ECD Administrative Database_be.mdb"
Tdf.RefreshLink
End If
Next
lastline:
End Function
---------------------------------------------------------------------------------------------------------------
Function pfVPNRelink()
Dim dbs As Database
Dim Tdf As TableDef
Dim Tdfs As TableDefs
Dim firsttbl As TableDef
Set dbs = CurrentDb
Set Tdfs = dbs.TableDefs
Set firsttbl = dbs.TableDefs("Administrative Policies")
'Loop through the tables collection
'Determines if the table Administrative Policies is already connected to the ECD Server
If firsttbl.Connect = ";Database=" & "\\10.100.89.7\Database$\Administrative Database\ECD Administrative Database_be.mdb" Then
GoTo lastline
End If
MsgBox "Connecting to the ECD Server via VPN. This will take a few minutes. Sorry for the inconvenience. Please click OK to start.", vbInformation
For Each Tdf In Tdfs
If Tdf.SourceTableName <> "" Then
Tdf.Connect = ";Database=" & "\\10.100.89.7\database$\Administrative database\ECD Administrative Database_be.mdb"
Tdf.RefreshLink
End If
Next
lastline:
End Function