Base Macro to Call or run SQL Query

I have a DB with a macro that makes amendments to records based on certain factors, in amending a record it also sets a flag to a field “Updated” to “Yes” this all works great! At the end of the macro I need it to run the query “SELECT * FROM “TBL_DEPT” WHERE “Updated” = “Yes”” and display the results in a form so users can confirm the changes. For the life of me I can not see how to display the results when using a macro. The SQL can be within the macro itself or it can call a predefined query I don’t really care.

Any help appreciated.
J

Hello,

It’s fairly simple. Just reload the form (code). Include at the end of your current code.

oForm = ThisComponent.Drawpage.Forms.getByName("TOUR_FORM_NAME")
oForm.reload()

By reloading your form or sub form the SQL used by that form/sub form is run once again thus any changes you just made are included.

Thought it would be simple just couldn’t find it. Thanks