I have an ADODB connection to an Access database, I want to list all the queries in the database (including select and action quries) and then list there SQL syntax in the next coloumn I want to do this using VBA and Excel. I am getting stuck on using the open schema with the recordset I am using adSchemaTables becuase I cant for some reason use adSchemaViews, i also dont have the syntax for finding the SQL of that query. Can this be done?
Code I have for returning the query is
Set rs = cn.OpenSchema(adSchemaTables)
For T = 1 To rs.RecordCount
Range("A" & T) = rs!Table_Name