This is a global variable question. When the user clicks exit, I do not want to exit unless a valid order number has been entered. I have used a global variable (gintFlag) to try to branch the Sub Form_Unload.
E.g., if the user clicks exit, the unload procedure calls the check order number...