Setting a boolean value through an event

Mac OS 14 LO 7.5
I am somewhat frustrated trying do something simple. I want to be able to change a boolean field to TRUE if a condition changes. It would seem the change event were triggered in a field I should be able to do something like Field.Value = TRUE or even if I could access the Navigation control.RecordChange then I could do the same thing in a main form or subform. I don’t want the user to think about this but IO
do want to be able to query and create a report based on record from either table that have changed. Once th report is saved I can update the Field.value to FALSE. I read and read trying to understand how to be able to call a function(Macro) to make this happen. When I go into the event to try and assign something it is locked, I did manage to get a maco assigned but I don’t know how to pu the parameters in so I get a scripted error. This is much more unintuitive th Access but I am willing to suffer to learn. I am not new to programming just where everything is here bd how to get it inited
Respectfully,
Glen

Might be the condition is a value in a field. So I would connect the macro to the event “Loosing focus” of this field.
Have a look for the name of the boolean field in the table, which is datasource of the form.
Write this name in the “additional information” of the field so you could find the right field by the event.

SUB SettingBoolean(oEvent AS OBJECT)
oField = oEvent.Source.Model
oForm = oField.Parent
oForm.UpdateBoolean(oForm.findColum(oField.Tag), True)
END SUB

This macro gets the object of the field from the event. It also gets the form, which contains this fields and the connection to the boolean field. Then the boolean field will be updated to True. Name of the boolean field in the table/datasource should be written in addition information of the field the macro is connected to.

Might be you need the value of original field: oField.CurrentValue

All this is described in the Base Guide: English documentation | LibreOffice Documentation - LibreOffice User Guides - have a look for Base Guide 7.3, special Chapter 9 Macros

SELECT "table".*, CASE WHEN "value">500 THEN True ELSE False END AS "Big Enough" FROM "table"
Create a new query in SQL view and replace “table” and “value” with actual names of table and column.

Thanks for your help… I am reading everything I can so
I think I need to create another object such oFieldChanged as Object then I need to assign the Boolean Field GRPChged into it, then place that as a parameter into the call to UpdateBoolean(oForm.findcolumn
(oFieldChanged.Tag,True), the problem is getting the oFieldChanged variable to be assigned the correct field name. IOt should be in the form of oFieldChanged= () need a little help here. this exactly what
i was looking for, s I get more knowledgable about this language I will get better at making more eficient coding solutions…

https://www.pitonyak.org/database/AndrewBase.odt
https://forum.openoffice.org/en/forum/viewtopic.php?t=49294