Code below seems to work, it only updates the sequence number when the fields are validated correctly. I am just wondering if my code below is causing problems - by exiting the sub.
I edit other fields that do not require any validation - but when i press esc it did not save the changes…
'check all validations
continue = ValidateCRForm(Source)
If Not (continue) Then Exit Sub
Call UpdateCRProfile 'incremental sequence number
need some help…when a user makes changes to any fields and press esc, it should save the changes. Currently, it does not…
Subject: esc not saving change data
Need more information Jeremy.
Where is this code located?
Can you post the full code ?
If it is in the QuerySave event then you should try and use another variable other than ‘continue’. In the querySave event if the variable continue is set to false then the document is NOT saved.
Subject: RE: esc not saving change data
“In the querySave event if the variable continue is set to false then the document is NOT saved.”
Isn’t that exactly what he wants to achieve?
Exiting out of the sub is save (and no changes to the document will be saved), if the preceding code does not do a back-end save anywhere and doesn’t modify any data in other documents, that might need a roll-back. If this is not the case, there’s nothing to worry about.