Home » Developer & Programmer » Forms » error frm-40803 (forms10)
error frm-40803 [message #640866] Thu, 06 August 2015 03:45 Go to next message
sanodani
Messages: 98
Registered: October 2014
Member
Hallo,

I have master and 2-detail blocks,
in detail block, i have WNRI- Trigger, which is as below, and these two blocks display records when the criteria matched (which is defined in WNRI in master block), either just in one block or in both blocks, as per the matched criteria.
and when the search criteria has matched just one and display the record in the respective blocks, but the problem i am having is, when i click to the above block in ID field then, it gives error:
"FRM-41803: No previous record to copy value from "
though the criteria is matched just the block below. I actually looking for that, when just criteria for block2 matched then it should display records in block 2 and the block1 should be deactivate or not allowed to click.
how can i solve this error? help please.

in detail blk:
if :system.record_status = 'NEW' then
	duplicate_record;
  set_block_property('block1', INSERT_ALLOWED, PROPERTY_TRUE);
	:block1.id := null;
end if;

regards,
Re: error frm-40803 [message #640873 is a reply to message #640866] Thu, 06 August 2015 04:13 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, maybe the simplest option would be to trap FRM-40803 in ON-ERROR or ON-MESSAGE trigger (I don't know what it really is - an error, or a message - you'll find that out). Something like
if error_code = 40803 and error_type = 'FRM' then
   -- do nothing, ignore it
   null;
end if;	 


Otherwise, if you want to disable the whole block, you'll have to do it item-by-item (as you can't set such a property for the block itself; at least, unless I'm wrong). That would require some more typing as you'd have to disable all items and enable them back when necessary.
Re: error frm-40803 [message #640876 is a reply to message #640873] Thu, 06 August 2015 04:25 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
You could also check which number record you're in. If it's 1, don't do duplicate_record.
Re: error frm-40803 [message #640935 is a reply to message #640876] Fri, 07 August 2015 01:34 Go to previous message
sanodani
Messages: 98
Registered: October 2014
Member
Thank you LF and CM Smile
Previous Topic: Peculiar problem in Hierarchical Tree in Oracle Forms
Next Topic: wnri Trigger problem
Goto Forum:
  


Current Time: Fri Apr 19 12:08:18 CDT 2024