Topic: [SOLVED] Prompt User Before Closing Form(s) When Fields Have Changed
Hi Folks!
.
I could use some help here, and I hope the topic is self-explanitory.
.
I'm not able to troubleshoot this because I don't fully understand what's going on in this line:
.
Form2.OnClose := @Form2_OnClose;
.
I've attached a sample project for demonstration...
.
There are currently two unsolved issues:
.
1. When the user changes a field, and then reverts the field back to the original content, the confirmation does not show AND the form will not close (or respond) either.
.
2. The confirmation is showing even when the user clicks the save button.
.
Originally I was using the Close button's On_Click event to handle this. Then I noticed the user could simply click the window's X (close) button without any confirmation. So then I found this thread that would handle that, but I can't get it working properly.
.
At this point, I'm almost ready to just settle with the first approach. I would appreciate any advice and/or suggestions.