* We have to be on baseform IF VARTYPE(ThisForm)='O' * If we are quitting the form or Visual FoxPro DO CASE * Form internal Valid CASE ThisForm.ReleaseType=0 * Form menu or X close CASE ThisForm.ReleaseType=1 IF This.lCloseNoValid RETURN .F. ENDIF * Quit FoxPro OTHERWISE IF This.lCloseNoValid RETURN .F. ENDIF ENDCASE ENDIFThat works. However, when I select an item in the menu, it bypasses this code. What other CASE can I add in here to detect the selection of an item in the menu?