How to (i) show (ii) record - calculated values on base form?

(i) I need to show in real time the sum/ difference/ division/ product of two fields in a form (not report) for data entry as a guide/check. By the way I am using Libre Base as front end for standalone MYSQL back end.

(ii) At another place I also need to store the data into an underlying table.

Try creating an unbounded text field, not enabled, and then manipulating the value programmatically in LibreOffice Basic through macros Tools → Macros → Organize Macros. This will provide solution, for normal non-grid form. I think there is a bug preventing it from working on a grid (see my question).

dim val1, val2, sum1
dim frm, ofForm
frm = ThisComponent.Drawpage.Forms
ofForm = frm.getByName("MyForm")

val1 = ofForm.GetByName("num_field1").value
val2 = ofForm.GetByName("num_field2").value

sum1 = val2 + val2

ofForm.GetByName("unbound_text1").text = sum1

Thanks Doug. It took me a little time to work on this particular problem and try it out. It works fine. A few details has to be added to meet my form requirements.