Thanks for the quick reply. No surprise to me if my approach is not an example of best practice, the little I know I have taught myself. If I am not beyond help:
1. When a form opens some things must happen or be in place. If not coded into the FormShow procedure, then where?
2. I am only trying to find a quick fix (that avoided re-starting from zero) to the REAL problem which I posted in Stack Overflow, but got no solutions. Perhaps you might opine there or here.
https://stackoverflow.com/questions/62124012/how-do-you-edit-records-in-a-form-that-diplays-records-from-two-joined-tables-f Here is a copy/paste:
I am using Lazarus and a Firebird database to display several Forms. The datasource related query_1 joins two, sometimes three tables, and the data is shown in TDBEdit displays.
I need to place two buttons on forms: MODIFY and SAVE for the users. If data was only one table MODIFY would basically call Query_1. Edit, and SAVE would ApplyUpdates. With the joined tables in the query ApplyUpdates would give an error, but thought I could have the SAVE call a query_2 to select the record in one table (and later the corresponding one in the othery -all in the same transaction) and Edit the modified field taking the value from the TDBEdit.Text or the modified dataset’s fields, but this does not work because Lazarus/Firebirs does not let the user write into the TDBEdit of the joined table even though they are not ReadOnly.
I could instead use simple TEdits , populating them from Qry_1 fields to display the data and make changes, and then use the modified texts to edit the corresponding fields, but this will require a lot of changes as well as programing to keep the user from introducing garbage, and seems not to be the best solution.
I believe I am complicating something that should be more "standard" and simple but have not found other solutions. Would appreciate somebody pointing me to the right “normal” practice.