Form closing on invalid filters

Demonic240Demonic240 Member Posts: 65
I have flow filters set up on a form. If you input a value into a flow filter that is not on the table it will close the form. I tried using the code:
IF NOT FINDFIRST THEN BEGIN
  MESSAGE('Div/Dep '+divdepfilter+' is not listed in the table.');
  SETFILTER("Div/Dep",'');
END;

to display a message that it is an invalid entry and to keep the form from closing. This does keep the form from closing but it also asks for the record to be changed each time you input a different value and errors out if you select to change it. That message is:
The [form] already exists.
Identification field and values:
No.='112',Accounting Period='4/30/07',Div/Dep='8082'

The referred fields and values are the primary keys and the first entry line in the table.

I need a way to keep the forum from closing when an invalid entry is input into a flow filter. That is the primary concern. The secondary concern is to reset the filters and display a message if the input value doesn't exist.

Thanks.

Answers

Sign In or Register to comment.