Hi WayneRyan,
the code is like this
Set tdf = dbs.TableDefs("tblSomething")
tdf.Connect = "Driver={SQL Server};" & _
"Server=" & Me.txtServerName & ";" & _
"Database=" & Me.txtDatabase & ";" & _
"Trusted_Connection=Yes;" & _
"Table=tblSomething"
tdf.RefreshLink
Set tdf = Nothing
How to change it if I need add user name and password? Thanks
Mark