Programming Questions? Ask a Programmer for Answers ASAP
What is the VBA command you are trying to set?
And how are you connecting to the SQL database, e.g. are you using ADO? If so, have you added the library, e.g. https://analysistabs.com/excel-vba/ado-sql-macros-connecting-database/
Ok, I'll opt out and let an expert who is more familiar with this subject help you. You don't need to repeat any information, they will be able to see the conversation.
Hello and welcome to JustAnswer, an independent technical support website. My name is ***** ***** it’s my pleasure to be assisting you today.
Can I see a screenshot showing how the original symptom looks like from your side?
Nice to meet you again. Do you mean it is the same issue?
Okay, what's the new issue?
The same principle, please first use print or msgbox to see the values of related variables, then you can know why.
As no further input gathered against my last clarifying question, I have provided a general answer based on the given description and common situations. For the additional matters, please kindly ask a new question to address it. Thanks.