Changing the source of a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a query which I want to change its source once in a while according
to some parameters (the changes I want to make are very thorough, so adding a
criteria won't help). Essentialy, I want to create a dummy query, which will
be used for different purposes, and its SQL will be changed different times.
Is there a way doing that using vb?
thank you,
 
Sure. Just set the SQL property of the QueryDef, e.g.:

CurrentDb.QueryDefs("Query1").SQL = "SELECT ...
 
Back
Top