SQL To/From VBA Converter
- Colin Riddington
- Aug 17, 2024
- 1 min read
Updated: Feb 18, 2025

Many Access developers regularly create queries in SQL view then convert them to VBA strings or vice versa. It can be very tedious performing these conversions: adding or removing line continuations, converting single quotes (apostrophes) and double quotes to ensure the code remains valid.

This utility started as a simple SQL to VBA converter. I then added the reverse functionality (VBA to SQL) and many additional features. In addition, the utility allows you to expand/indent SQL strings, create test queries and example code from VBA strings, checks for valid SQL/VBA and much more. It can be a huge time saver for Access developers.

Recently, I converted it to an Access add-in so it is even easier to use with your applications.
However, it can still be used as a standalone application if preferred.
The utility is available as a fully functional, free 32/64-bit ACCDE add-in from https://www.isladogs.co.uk/sql-to-vba-back-again. This article includes full details of all features.
For anyone interested in knowing how it works, the source code is available to purchase. The introductory price is £30 GBP (until 31 August 2024). After that, it will cost £40 GBP.
NOTE: Other similar converters are available online. For example, an excellent Access to T-SQL converter is available at: https://accessusergroups.org/sql-converter/