Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Re-linking tables and permissions problem

Status
Not open for further replies.

mcelligott

Programmer
Apr 17, 2002
135
US
I have the following code run when the front-end of my database opens. It re-links the tables if it finds the primary server (there is more that determines if it does not see the server to re-connect to the local machine).

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("Alarm Companies")

'Determines if the table Alarm Companies is already connected to the ECD Server
If firsttbl.Connect = ";Database=" & "\\ps911pdc\Operations Database\ECD Operations Database_be.mdb" Then
GoTo lastline
End If

'Loop through the tables collection and relinks to the ECD server if not already connected
For Each Tdf In Tdfs
If Tdf.SourceTableName <> "" Then
Tdf.Connect = ";Database=" & "\\ps911pdc\Operations Database\ECD Operations Database_be.mdb"
Tdf.RefreshLink
End If
Next

lastline:

It works great when I am the user signed on but when the other users (non-admin) sign on, they get the following error:

Run-time error '3033':

You do not have the necessary permissions to use the 'Alarm Companies' object. Have your system administrator or the person who created this object establish the appropriate permissions for you.

What I think it is saying is that if the user does not have the ability to modify a table design then they can not re-link to another source. I definitely do not want the users able to modify table design but unfortunately do want them able to re-link. Any suggestions how I can do this?

Any help would be greatly appreciated.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top