Post by Glenn JohansenIf I use the onsave event to make some changes to the "row that was just
saved" do I have to turn off ( null out ) the onsave event then set it back
on?
- glenn
Glenn
I am not sure if I fully understand what you are doing here but FWIW ONSAVE will only fire if there was actual data changed in the recod. If no data was changed then it will not fire.
For example, I use a routine which alters the behavior and appearance of my forms when entering the edit mode. After editing is copmpleted (Data modified) the Onsave event fires and alters the look and behavior of my forms back to what it was before entering edit. This works well "if there was an actual change to the data" made.
The problem I ran into was when someone entered the edit mode but then never actually made any changes to the data before exiting edit. In that case ONSAVE never fired because the data was not modified.
Onsave looks at Modified before firing. If" Modified = false" (data was not changed) Onsave will not fire and thus will not save the record or run any associated code.
The solution I found was to force Onsave to fire regardless of whether the data was saved or not, thus, running the associated code whether the data was saved or not. This was easy to do by simply ensuring "modified" is set to "true" before exiting the edit mode (added line "Modified = true" to the end of my edit routine) thus fooling Onsave into thinking the data was changed and firing even if it wasn't.
I don't know if this helps, but there it is ....
Bruce