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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

relinking tables at runtime in an mde??

Status
Not open for further replies.

Junior1544

Technical User
Apr 20, 2001
1,267
US
am i able to relink tables at run time for my users in an mde?? i'm tring to in vba and it keeps giving me an error when i login with a user account, but not with an admin account... i even tried giving my user account admin privliges, and it didn't work... here's the relinking code that's giving me an error...

it says the user account doesn't have permision... and this is while using a front end that's an mde, and a back end mdb... both are in access 2k... thanks

--Junior

Call LinkTables("c:\db\db_be.mdb")
JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
forgot to include this... this is in my basGeneral module...



Public Sub LinkTables(strDatabase As String)
Dim dbs As Database
Dim tdf As TableDef
Dim intI As Integer

Set dbs = CurrentDb
Set tdf = dbs.TableDefs(0)

For intI = 0 To dbs.TableDefs.Count - 1
Set tdf = dbs.TableDefs(intI)
If Len(tdf.Connect) > 0 Then
tdf.Connect = ";DATABASE=" & strDatabase
tdf.RefreshLink
End If
Next intI

End Sub
JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
it keeps telling me that the user doesn't have permission... what permision do i need to give the user to be able to do this??

i am using access security...

sorry for the multiple posts... but as i kept playing with it, it kept making me think more...

--Junior JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top