We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


Supressing FRM-40209 message in Forms 9i

Medium Priority
Last Modified: 2012-05-07
Hi experts
Please provide me a solution to supress FRM-40209 error message. Here's the requirement - There are about 50 database text items in the form that are grouped accodingly. The user should input a non negative number and they can additionally enter n/a or na that should be treated as 0. Each group has a total that is also data entered by the user & henceforth converting na to 0 should be done at text item level so as to compute totals easily (no block level trigger).

I've written 2 triggers for each text items to accomplish this to some extend
1. KEY-NEXT-ITEM - This handles the non negative numbers perfectly. No issues at all
2. ON-ERROR - This is fired when the user enters NA (verified using message). However it fails to assign the entered text from NA to 0 and also fires "FRM-40209: Field must be of form 999,999,999" 3 times (not sure from where).

My question is...
1. How can I supress this "FRM-" message from appearing & should not affect anything else and also treat NA as 0
2. Having these 2 triggers is also affecting the "TAB" functionality in the forms. (After hitting the TAB key, the cursor still stays in the text item unless I use the mouse to click on different text item. This happens even if a right numeric value is entered). How can I over come this?

Note - I've set :MESSAGE_LEVEL to 0 & 5 which did not supress the error messages.

Thanks in advance for any help.
Code in ON-ERROR
	mAlert	Number;
	mAlert := Show_Alert('CLOSE_ALERT');
	If Upper(:SCR_0) = 'NA' OR Upper(:SCR_0) = 'N/A' OR Upper(:SCR_0) = 'N.A' Then
		:SCR_0 := 0;
	End If;
	mAlert	Number;
	If :SCR_0 < 0 Then
		SET_ALERT_PROPERTY('CLOSE_ALERT',ALERT_MESSAGE_TEXT,'Please enter a non negative number');
		mAlert := Show_Alert('CLOSE_ALERT');
		:SCR_0 := 0;
	End If;

Open in new window

Watch Question


Remove the format from your text_item and make the item a char field. (you want your user to be able to enter NA)

Add your own validation of format in the when validate item of the fields.

something like
        If Upper(:numfield) = 'NA' OR Upper(:numfield) = 'N/A' OR Upper(:numfield) = 'N.A' Then
                :numfield := 0;
        End If;
              n1 number;
          n1 := :numfield;
        exception when others then
                message ('enter a numeric character or NA (not available)');

when interception an key_trigger you remove the default behaviour of that key

add the build-in
add the end of your key_next_item-trigger to activate the default behaviour


Thanks for the suggestion.
I've used CHAR field before, but then I found the following shortfalls...

1. There're calculations based on these data entry fields. E.g. I enter a number in FIELD1 (numfield), there is somewhere a FIELD9 that shows FIELD1+FIELD2+FIELD3+FIELD4+FIELD5. So when I enter NA in FIELD1, it throws a FORMULA-CALCULATION error (FRM-40735)
2. Another requirement of the users is to accept "," during input. So if FIELD1(numfield) is a character field and the input is 999,9 then I get an error. So I'd to write down a big piece of code to scan the entire string to eliminate the "," & get a final number. Moreover, this large code has to be copied over to about 50 different fields.

Any other suggestions please?

Also requesting you to elaborate on the following

"when interception an key_trigger you remove the default behaviour of that key

add the build-in
add the end of your key_next_item-trigger to activate the default behavior"

Thanks for any help.


What a poor response? Its more than 2 days since I've posted this question & there's no solution. Technology really frustrates now!!!
Unlock this solution and get a sample of our free trial.
(No credit card required)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.