WHEN-VALIDATE-ITEM trigger fires to check the value of an item to insure it is valid. The timing of this event may vary but one of the most common is when the user enters a value and causes the cursor to try to exit the item by pressing the TAB key or using the mouse to click elsewhere in the form. This trigger can also fire when then user attempts to leave a record that has been marked for insertion or change.
KEY-NEXT-ITEM fires only when the user presses the TAB key.
[sup]Beware of false knowledge; it is more dangerous than ignorance. ~George Bernard Shaw[/sup]
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000
[sup]When posting code, please use TGML to help readability. Thanks![sup]
You should also note that WHEN-VALIDATE-ITEM trigger is a restricted procedure, so you cannot use navigation built-ins (such as GO_BLOCK). There are no such restrictions with KEY-NEXT-ITEM.
Dima:
You are right, of course. What I should have said was a more generic "pressing a key".
Lewisp:
Good point. I was only thinking about the common newbie mistake of putting validation code in KEY-NEXT-ITEM.
[sup]Beware of false knowledge; it is more dangerous than ignorance. ~George Bernard Shaw[/sup]
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000
[sup]When posting code, please use TGML to help readability. Thanks![sup]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.