In a Purchase Order database I have 2 forms, one is my menu and one is a data entry form. On the Menu I have a button that uses the openform method to open the data entry form. I would like the button to prompt the user for the PO number to look up that PO. The following code seems to work:
stDocName = "PurchaseOrder"
DoCmd.OpenForm stDocName, , , "[PO_NUM] = PO_Number"
The problem I'm having is that if the user clicks on the Cancel button on the inputbox, they get the message "The Open Form Action was Canceled" and both forms wind up being closed. Is there a way to get the cancel button to open the Menu form again? Any help is greatly appreciated.
Jim
stDocName = "PurchaseOrder"
DoCmd.OpenForm stDocName, , , "[PO_NUM] = PO_Number"
The problem I'm having is that if the user clicks on the Cancel button on the inputbox, they get the message "The Open Form Action was Canceled" and both forms wind up being closed. Is there a way to get the cancel button to open the Menu form again? Any help is greatly appreciated.
Jim