How to determine the form Mode?
I mean How to Know if the form is in Edit mode or insert mode?
it depends on your tool-bar.
when you disable “update” and the “go forward” “go backward” - buttons, your form will automaticly be in insert mode.
when you disable insert-button and enable update, you are in update mode withour navigation and without insert-option.
when you enable navigation, user can navigate.
when you enable all these tools, the user can do both: update data and insert new.
when you want to change behavior, make two forms, one just for updating, one just for insert
i dont know - i never used - if there is a macro for showing/hiding these buttons to change the mode of the form without using a second form.
But I need with code or macro determinete if the form Is in mode Edit or Is in mode Insert, for execute other scripts
Yes, I need the same
There are a macros: sc_btn_new - sc_btn_insert - sc_btn_update, etc
checking if the table primary id field is empty should do the trick
if (empty({id_primary_field})) { …
if ({id_primary_field} < 1) { …
also does it