Unanswered: How to determine determine if add new rec button was pressed in the before update
I have a Bound form with the the builin navigation bar on.
More over I have some code and validations written in the following events:
A) Form - On current
Have checked if add new record is triggered by either the moving past the last rec / by clicking the add new button.
and handled the even accordingly.
B) Form - Beforeupdate
Have validated certain values and have asked user wether he wants to save changes. DEpending on the answer the record is either saved or changes discarded.
C) Form - Afterupdate
Certain other business logic gets executed.
Now in case the user presses the addnew rec button (the built in one on the recordbar) the event that gets triggered is the before update .. the processing takes place as per the code .. but the record does not get updated neither does the add new event gets triggered. the records gets saved if I press the add new rec button the second time round and get the same message box all over again. this time the record gets saved but yet again new record is not added .. New record is added only and only if I press the add new rec button the third time.
Well I can not disable the add rec button on the navigation bar while a record is being edited .. So currently I can not figure out how to handle the situation. (unless I get rid of the default bar and use a custom bar - which I am at present reluctant to do).