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

Refresh table links; tbl linked frm SQL, using windows login

Status
Not open for further replies.

wz

Programmer
Feb 16, 2001
88
0
0
US
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 = "ODBC:DATABASE=filename.accdb, UID=user"
dbsCurrent.RefreshLink





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top