Avatar of deer777
deer777
Flag for United States of America asked on

MS Access VBA change connection string of SQL Pass Through Table

Create VBA code that will changes the connection string of the SQL Pass Through table (DB_A) to the sandbox table that gets created by DB_B
Microsoft AccessVBASQL

Avatar of undefined
Last Comment
PatHartman

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Dale Fye

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
deer777

ASKER
I am using Access 2010
PatHartman

The version of Access doesn't affect the connection string.  It is the version of the driver and the server that you need to be concerned with.  Here is a relinker I made that lets you swap between various production and staging libraries.  I used part of the server instance name to define what needed to be swapped.  At the end, all the pass-through queries are relinked.
RelinkODBC.accdb
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23