Home » Developer & Programmer » Forms » How to get rid of FRM-41051 error?
How to get rid of FRM-41051 error? [message #82693] Mon, 23 June 2003 13:08 Go to next message
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 Go to previous messageGo to next message
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.
Re: How to get rid of FRM-41051 error? [message #597282 is a reply to message #82695] Wed, 02 October 2013 12:54 Go to previous message
gvsantos
Messages: 3
Registered: May 2011
Junior Member
Above the explanation.

If the record is in looping, just put the following command, BEFORE command NEXT_RECORD:

EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';

Att,
Previous Topic: show increasing digit 1 to 100 in a text field after pressing one by one
Next Topic: file transfer form server directory to client
Goto Forum:
  


Current Time: Fri Apr 26 15:15:00 CDT 2024