Re: Can you make a form prompt the user to save changes when they exit?
The short answer. There is no built in function.
This answer can be simple or get real involved. The simple answer is that when on onChange/onClick event happens, you can set a variable and call confirm if that variable is true. There is no guarantee that the user did not revert the data back. In this case, you are still safe as they have made some changes, but they reverted back, hence a prompt.
Another approach perhaps is to show the record in VIEW only mode first (all fields are labels). Create a button called edit. that loads another form identical, but all fields are in edit mode. If they click update, prompt and save.
This helps in several ways, as it allows user to view the record. If they edit, then they get a prompt (if an onchange/onclick was triggered) and save the record.
If you are bent on showing a prompt only if the data is different on save, then you will have to write your own array function to compare the fields at time of load from the fields in the client form that are about to be saved. (also taking to consideration that perhaps another user has loaded and saved the data on another pc) This is were it gets more complicated… research triggers, etc.
Regards,
Scott.