I have created a user function that has all my save logic in it, including some validation. I call the function from various points in my code: Save button, Close button, Exit Application button.
My problem is if the validation fails, I need to stop the event which called this function. The DoCmd.CancelEvent does not work from the function. I cannot figure out how to pass a value back from my function to the event in order to check it and do the CancelEvent logic from there.
Any help?!?
Thanks in advance!
SCubed
My problem is if the validation fails, I need to stop the event which called this function. The DoCmd.CancelEvent does not work from the function. I cannot figure out how to pass a value back from my function to the event in order to check it and do the CancelEvent logic from there.
Any help?!?
Thanks in advance!
SCubed