This is what I meant in first instance.
VBA Code connecting to sql server 2019
Microsoft 365 and Office | Access | For business | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
12 answers
Sort by: Most helpful
-
-
George Hepworth 22,220 Reputation points Volunteer Moderator2023-07-11T15:30:37+00:00 "I have enabled the ports also."
And the result is....?
-
George Hepworth 22,220 Reputation points Volunteer Moderator2023-07-11T16:09:02+00:00 You posted a screen shot of an error message, stating that a connection can't be opened. You follow with the statement that "This odbc connection works connecting to sql server 2019".
I'm a bit confused now. When does it work? When does it not work? Obviously you are getting an error message.
When and where is that error raised? And how do you know that the line of code posted actually does open an ADO connection in VBA?
I suspect I know the problem and that it's been previously mentioned, but one step at a time.