The form.ActiveCommand contains the SQL used to determine the content of the form, it is readonly.
I would like to present data in a form in various ways (the table as a whole, in a one to many relation as a left outer join, …). The form content is based on a query. On the form are a few buttons to change the SQL of the query, subsequently the form.reload() command is executed.
However: the contents of the form(“MainForm”).getByName(“MainForm_Grid”) is not updated. After closing the form and reopening, the change in SQL of the query becomes visible.
Is there a dynamical method to do this without closing/opening the form.
dbConnection.getQueries().getByName(qry_name).Command = SQL # write SQL
oForm.getByName("filtersetting").ListSource = [SQL, ]
oForm.reload()