Hi Chuck,
On Tue, Jan 29, 2019 at 5:11 PM Chuck Miller via 4D_Tech < [email protected]> wrote: > I have created a subform with an add button on it. In the form method I > call subform (-999) > What kind of subform? input or output What is the button adding? And is it doing so with an automatic action or your own code? In object on the subform I have case > :(form event=-999) > if(read only state(table)) > object set visible(*;”Addbutton”;false) > else > object set visible(*;”Addbutton”;true) > end if > Have you traced the subform object to verify the code isn't running? I've never really seen CALL SUBFORM CONTAINER not ping the parent object. Also, the way you have described this "Addbutton" is on the parent form - since the code will run in the context of the subform object on the parent form. I guessing but it looks like you may want "Addbutton" to be on the subform and only visible when it's possible to add a record to 'table' which is displayed in the subform. I would handle that in the subform itself - where you code would work fine. But is Addbutton is on the subform it won't do anything called from the subform object. Does that help? -- Kirk Brooks San Francisco, CA ======================= *We go vote - they go home* ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

