Save SqlString as a query

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

Guest

I am generating a SqlString based on various inputs and want to do a SAVE AS
to save the final SqlString as a query. I will use this as a sub query to
generate a scatter plot. My sub query would be named Q_Sub

I will need to overwrite the Q_Sub query each time I run it.

I then need a line of code that will update the chart with the Main query --
Q_Main -- instead of the SqlString, ie replace Me.Graph0.RowSource =
SqlString with something like Me.Graph0.RowSource = Q_Main

Thanks!
sandy
 
Not sure what exactly you are attempting to accomplish but you can change
the SQL of a saved query with a little DAO code.

CurrentDb.QueryDefs("qselYourName").SQL = strYourSqlString
 
Back
Top