PrincipalFuller
Programmer
Is it possible to display a query without saving the query?
I would like to have a table with three fields: Query Name, Category, SQL
And then in VB I want to grab the SQL from the table, run the query, and display the results... without needing to save each and every query that will be available.
Is this possible?
Alternatively, if I use code such as this:
strSQL = "SELECT Gender, PPAID FROM dbo_Ppl_Student;"
Set qdf = CurrentDb.CreateQueryDef("NewQuery", strSQL)
DoCmd.OpenQuery qdf.Name
Is there a way to check to see if the query already exists before it creates the "NewQuery" ?
(Use Case: I'm making an Access DB which will be stored locally on each users hard drive, connected to a cloud based SQL server, and if I add a new query, I don't want to re-update each users local database file).
Thanks!
I would like to have a table with three fields: Query Name, Category, SQL
And then in VB I want to grab the SQL from the table, run the query, and display the results... without needing to save each and every query that will be available.
Is this possible?
Alternatively, if I use code such as this:
strSQL = "SELECT Gender, PPAID FROM dbo_Ppl_Student;"
Set qdf = CurrentDb.CreateQueryDef("NewQuery", strSQL)
DoCmd.OpenQuery qdf.Name
Is there a way to check to see if the query already exists before it creates the "NewQuery" ?
(Use Case: I'm making an Access DB which will be stored locally on each users hard drive, connected to a cloud based SQL server, and if I add a new query, I don't want to re-update each users local database file).
Thanks!