This is further developments of a Text List that I’ve been discussing recently. This is a Sales Tax report that I run every month for the previous month’s sales. I build a query string from user input about which month/year he wants the report for. The Text List is the main part of the report; I do some additional calculations with arraybuild statements, using the same query string MyQuery. The last 2 lines of my procedure are:
changeobject "TaxList","$TextListQueryFormula",MyQuery openform "WA Tax Form"
This all works fine except that the $TextListQueryFormula is not updated, it contains whatever query text was in there before. So I get a report with header text indicating the month I asked for, and totals from the arraybuilds that correspond to the right month, but the data in the list is from the previous query. I have had to manually edit the query in the Text List Options pane to get what I want. I tried adding a line “showvariables MyQuery” at the end and even before it but it does nothing. “TaxList” is indeed the name of the Text List object. Would I get an error if my changeobject code referenced a non-existent object? What can I do to make this work? Other Text Lists I’ve made don’t have this problem, but maybe I’m leaving something out.