I have a database in Access which uses linked tables from SQL. The security is based on the end users windows login. I do updates to the front end in Access and then update each users computer with a copy of the new dbf. I need the database to update the table links to use the current end user's windows login (currently the dbf holds my login & I manually update link).
my table link is as follows:
ODBC; DSN=filename; UID=windowsloginname; APP2007 Microsoft Office system; DATABASE=filename; Trusted_Connection=Yes
In other words I need the UID to = the users loginname.
I tried: (on SplashScreen load)
Dim dbsCurrent As Database
Dim tdfLinked As TableDef
Set dbsCurrent = OpenDatabase("filename.accdb")
Set tdfLinked = dbsCurrent.Connect
dbsCurrent.Connect = "ODBCATABASE=filename.accdb, UID=user"
dbsCurrent.RefreshLink
my table link is as follows:
ODBC; DSN=filename; UID=windowsloginname; APP2007 Microsoft Office system; DATABASE=filename; Trusted_Connection=Yes
In other words I need the UID to = the users loginname.
I tried: (on SplashScreen load)
Dim dbsCurrent As Database
Dim tdfLinked As TableDef
Set dbsCurrent = OpenDatabase("filename.accdb")
Set tdfLinked = dbsCurrent.Connect
dbsCurrent.Connect = "ODBCATABASE=filename.accdb, UID=user"
dbsCurrent.RefreshLink