foxprox558
Programmer
Hi, me again.
Just wondering if there is any way to break a function in foxpro, for example I have an If statement that looks to see if an order has already been deleted, and If it has, I need the whole process to end here's the code
Thanks!
Just wondering if there is any way to break a function in foxpro, for example I have an If statement that looks to see if an order has already been deleted, and If it has, I need the whole process to end here's the code
Code:
nOrd=INPUTBOX("Enter The Order Number To Delete.", "Individual Deletion")
USE orders SHARED
LOCATE FOR (orders.invoiceno)=VAL(nOrd)
IF FOUND()
IF DELETED()
MESSAGEBOX("This Record Has Already Been Marked For Deletion.", 48, "Record Already Deleted")
&& Something needs to go here to tell the program to stop this process
endif
nConf=MESSAGEBOX("Are you sure you want to delete order # "+nOrd+" ?", 4, "Confirm Deletion")
DO CASE
CASE nConf=6
DELETE
MESSAGEBOX("Order # "+nOrd+" Has successfully been deleted.", 64, "Order "+nOrd+" Deleted")
CASE nConf=7
ENDCASE
ELSE
MESSAGEBOX("Order Not Found In Database.", 48, "Order Not Located")
endif