Well, knock on my head. I probably won't be able to get
into the ADP file to change the "connection" server option
at all once the original server is not available. Or will
I? So perhaps I *am* back to the same question!
I run this code from my default form (one could use an AutoExec macro as
well, I assume, but I never have):
Public Sub LetConnectionString()
With CurrentProject
If Not .IsConnected Then
.OpenConnection ("PROVIDER=SQLOLEDB.1;" _
& "INTEGRATED SECURITY=SSPI;" _
& "PERSIST SECURITY INFO=FALSE;" _
& "INITIAL CATALOG=NewDatabase;" _
& "DATA SOURCE=NewServer;" _
& "Use Procedure for Prepare=1;" _
& "Auto Translate=True")
End If
End With
End Sub
This chugs along a bit the first time it connects to the new server, but
after that Access saves the connection string and all's well. (I think the
Persist Security line is redundant with Integrated Security but as I
sometimes use an SQL login I leave it there as a precaution.)