Hi all,
I have the following code in the beforeinsert trigger of a company table:
What I want is for a new record not to be created if one already exists. In the above code the message gets displayed but a new record still get inserted which i have to delete manually as the above code does not work.Code:// Trigger onbeforeinsert for table company if reccount() <= 1 return .t. else messagebox("Only one company can be created!") delete return .f. endif
The insert button of a form section is used to create the new record.
How do i fix this?
Best Regards
Bookmarks