Add script to the Accept button in Sales Order Entry - Sage 100 2014

SOLVED

Hi all. We have Sage 100 2014. I created a "test" Accept button to display a message box to the end user when the sales order's total amount is less than the account's UDF_MINORDERFREIGHT. It works as it should, but now I want to add this code to the "real" sales order Accept button but I don't see where I can add my code. So I'm thinking I need to hide the real ACCEPT button and display my "test" Accept button. The problem is I don't know how to make my "test" Accept button to display the message box and save the sales order, or if there is no message box to display then it still must save the sales order information. Basically, I need the Accept button to work as it's supposed to but I just want to display the message box if the criteria is met and then the normal Sage logic should continue to run.

Below is my working code for displaying the message box for my "test" Accept button:

If SO_SalesOrder_bus_NonTaxableAmt + SO_SalesOrder_bus_SalesTaxAmt < SO_SalesOrder_bus_UDF_MINORDERFREIGHT THEN
Msgbox("Please change the ship via for this order. The order amount is less than the account's minimum order freight amount")
End If

Thank you in advance!