:banghead:
I have inherited an Access 2000 database that has a routine to change the ODBC connection from the live tables to development copies.
When triggering this, the user is prompted to save the changes to the module. I have not been able to find a solution to save this change through code with online searches, possibly because I don't know how to work the question.
Here's a sample of the code:
The only change from one line to the other is the [my file path] part of the code to change the ODB connection string.
Is there a way to save this change without the user responding to a prompt?
I have inherited an Access 2000 database that has a routine to change the ODBC connection from the live tables to development copies.
When triggering this, the user is prompted to save the changes to the module. I have not been able to find a solution to save this change through code with online searches, possibly because I don't know how to work the question.
Here's a sample of the code:
Code:
Access.VBE.ActiveVBProject.VBComponents("GlobalConstants").CodeModule.ReplaceLine 5, "Global Const dbConnectString = ""File Name=[I][my file path][/I]"""
The only change from one line to the other is the [my file path] part of the code to change the ODB connection string.
Is there a way to save this change without the user responding to a prompt?