ar****@yahoo.com wrote:
I have a number of OBDC connections to SQL server tables in my access
database. I want to change the data source for each of the links at
once. With the linked table manager you can only change the source one
link at a time.
I will want to provide the user with a way to switch the data source
from a form interface.
How can this be accomplished?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Just change the .Connect property of the TableDef object, then run the
..RefreshLink method. E.g.:
CurrentDB.TableDefs("my table").Connect = "ODBC;Driver=SQL Server;..."
CurrentDB.TableDefs("my table").RefreshLink
Of course, this should be done in a VBA module w/ error traps.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQjesK4echKqOuFEgEQItGQCfbF7qHFWJ630oZE9JP+d9FW qL/60AoLV5
+hd/NJsFnV8oCl8oAy3Qi65G
=fp64
-----END PGP SIGNATURE-----