How to get rid of FRM-41051 error? [message #82693] |
Mon, 23 June 2003 13:08 |
Swamy
Messages: 78 Registered: June 2002
|
Member |
|
|
I have a form with master detail blocks and the block properties are set to no inserts, no updates, and no deletes. When I am at the last record and whenever I navigates to the next record, the system gives a message “FRM-41051: You cannot create records here”. Then the system is not allowing me to go back to anywhere and it insists me with a message “FRM-40202: Field must be entered”. The if I try to exit the form it says “Do you want to call the new form?” How to get rid of this? I am unable to figure out and appreciate in advance for any valuable help.
|
|
|
Re: How to get rid of FRM-41051 error? [message #82695 is a reply to message #82693] |
Mon, 23 June 2003 16:59 |
Julie
Messages: 98 Registered: February 2002
|
Member |
|
|
In tabbing beyond the last record, you are telling the form that you want to add a record, hence the message. To get rid of it, I suggest you create an on-error trigger, check for this error number and suppress the message.
DECLARE
lv_errcod NUMBER := ERROR_CODE;
lv_errtyp VARCHAR2(3) := ERROR_TYPE;
lv_errtxt VARCHAR2(80) := ERROR_TEXT;
BEGIN
IF (lv_errcod = 41051) THEN
return;
ELSE
Message(lv_errtyp||'-'||to_char(lv_errcod)||': '||lv_errtxt);
RAISE Form_Trigger_Failure;
END IF;
To get rid of the "Field must be entered" change the property of that column to be not required. Since you are not changing or creating data here, it doesn't matter.
|
|
|
|