I have created a query in Base which has a calculated column (modified sql SELECT statement) based on another column in the query. The problem is when I enter a value for the column on which the calculated column is based and then tab to the next field, the calculated column is not displayed. Is this the way base works or am I doing something wrong?
Asked
Active
Viewed 1,241 times
0
-
Please add the exact table definitions (`CREATE TABLE` ...). "Modified sql select statement" is too broad. – tohuwawohu Oct 19 '15 at 10:35
-
The following code is part of a select statement: – user1897830 Oct 19 '15 at 13:18
-
It is a sql SELECT statement where I have added a couple of calculated fields. The calculated fields do not display during data entry. The query has to be re-run before they display. – user1897830 Oct 19 '15 at 13:30
1 Answers
0
That is the way Base works; calculations are made at the time the form is loaded or refreshed, or when a query is run. If you want new calculations to be made you have to rerun the query or refresh the form.
"Refresh form" is an available "action" property of form buttons, and getting calculation results is a common use for a refresh button.

Lyrl
- 925
- 6
- 16
-
Thanks for that. Could the calculated fields be displayed automatically at time of data entry if they were programmed as a macro? – user1897830 Oct 20 '15 at 02:38
-
You could tie a refresh form macro to a textbox/formatted field/etc. control event (some example StarBasic code to refresh a form is [here](https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=70818&p=317448#p317448)). You might have to test a couple of events; the "text modified" event sounds promising but OpenOffice events are not well documented. – Lyrl Oct 20 '15 at 15:27