If you do currpage.update in onopenform, you will get the strange behavior with oninsert running twice, but updating the record only once.
It executes once when the new button is pushed, and once when the actual insert occurs.
if you are using number series, the result is that it skips a number each time.
Anybody else experienced this? Seems like a bug to me. I'm running R2.
0
Comments
OnOpenForm would be a trigger I wouldn't do an update. currpage.update has an optional parameter. Default behaviour is saving the record to the database, with implicitly calling the OnInsert trigger of the table. In the OnOpenForm trigger you have no actual record fetched from the database, you have one in the OnAfterGetRecord trigger. If there is no record in your SourceTableView, OnNewRecord gets called first.
Wat do you want to do with the update in OnOpenForm?
with best regards
Jens