Hi,
I am new to the forum as well as new to MS Access / VBA. So I found out that there are 3 different ways to run a query in VBA. I know that RunSQL should only be used for action queries (no SELECT) and plus the error handling there is troublesome. Plus it's a tad slower. With QueryDef and CurrentDB execute method, we can control the errorhandling, etc. But what's the rule of thumb on when to use which one? This question has probably been asked before. I did a quick keywords search but couldn't find any posts. If there's an old thread, please share a link and I can just read through it. Otherwise, new replies are welcome.
To give a perspective of what I am trying to accomplish. I am creating a form with a dropdown list and a command button. Upon clicking the button, I will want to execute a query + export to .csv / .xlsx based on the user selection from the dropdown list.