Page 1 of 1

How to use f8 function

Posted: April 9th, 2012, 11:25 pm
by saobachminh
Hi you guys,

As my topic name,i am confused how to use f8 function. You all knew that whenever we type wrong value for one variable that we wrote a logic check for it, and then f8 message shows like that "press f8 to clear", but when i press f8 my program did not automatically clear that variable, it jumps to next variable instead. My point is how to clear target variable whenever i use f8 function.

Thanks all

Dung

Re: How to use f8 function

Posted: April 10th, 2012, 6:32 pm
by Gregory Martin
The "Press F8 to clear" messages means that the error message box will disappear when the keyer presses F8. "Clear" refers to the error message, not the contents of the field.

If you want to prevent the user from moving to the next field, you use the reenter command. For example, this is a typical error check:
if AGE < 15 and MARITAL_STATUS <> 1 then
    
errmsg("People under age 15 must be unmarried!");
    
reenter;
endif;

Re: How to use f8 function

Posted: April 10th, 2012, 11:39 pm
by saobachminh
Thanks Martin,

Actually, i did the command as you given before and it worked well. I thought that there is a command going with f8 function but it is not.

Best,

Dung