Affichage des articles dont le libellé est How can I create and see the results of a SELECT query in VBA?. Afficher tous les articles
Affichage des articles dont le libellé est How can I create and see the results of a SELECT query in VBA?. Afficher tous les articles

How can I create and see the results of a SELECT query in VBA?

dimanche 22 mars 2015

Hi there,



Thanks for taking the time to look.



I was beginning to think I had got the hang of creating queries on the fly in VBA. After several hours I have just learned that docmd.runSQL does not work for simple SELECT statements. I'm not going to worry about why that would be. I'm sure there's a jolly good reason.



So... I am able to dynamically create the SQL string for the SELECT statement that I need.



How do I run it? It just needs to return results as a datasheet so I can see them. I'm running Access 2013. I've been searching on this subject for quite a while and found many references to DAO, ADO, ADODAOD, YODELAEYYOUDELAYIO! and other things I don't yet understand :-)



Hopefully this is simple.



Thanks



Alan

How can I create and see the results of a SELECT query in VBA?

Labels