Access MVP (2010-2015)

oOo.oOo.oOo.oOo.oOo.oOo

SQL to VBA

Recently, I saw a post regarding moving a Query (SQL) to VBA.  I remember I saw something somewhere that automated this task but could not remember where.  Well, after a little surfing of my favorite sites I found it… Copy SQL statement from query to VBA by Allen Browne.  And, because I couldn’t leave well enough alone, I created the database following the steps listed and, for fun, added a *Copy to Clipboard* button just so you can now click the button and paste, with Ctrl+V, right into the VB Editor…

SQLtoVBA

…and you can download it here.

Note: The SQL cannot be used as RowSource for any Control or RecordSource for any Form.

11.13.2015  Amended so you can now also convert INSERT, DELETE and UPDATE queries as well.  Enjoy!

 1,806 total views,  1 views today

Comments are closed.