I use Option Explicit as a rule so this compiles for me
Code:
Sub Test()
Dim strConnect As String, strServerName As String, strDatabase As String
strConnect = "ODBC;DRIVER=ODBC Driver 18 for SQL Server;Server=" & strServerName & ";UID=SAC_User;PWD=sac;DATABASE=" & strDatabase & ";Network=DBMSSOCN;PORT=1499"
strConnect = strConnect & ";iTrustServerCertificate=True;Trusted_Connection= Yes;Encrypt=True"
End Sub
What is the compile error message?
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.