Create SQL query parameters dynamically

The sql Command property is String. Therefore you should be able to create your query and update it using variables e.g. strSQLCommand = "SELECT * FROM " + strTableName + " WHERE ID = " + strID + “” (you’ll have to work out how many end quotes!)

In the above strTableName and strID are variables generated in your process from any source, which are then included within the SQL query string. You would then put strSQLCommand into the sql Command property instead of the text.