Hello,
I have a Click event on a button that executes a stored procedure. In the stored procedure, the following code is executed if an error is encountered. I was hoping this code would cause control to return to the form so that the user could make the data-entry correction; however, the program continues to execute.
Def='
Def=BO
Def=This is a test'
Def=Test'
x=msg( @window, Def)
Set_Property('SYSTEM','FOCUS',@window:'.FERT_JV_BUILD')
Thanks Bruce
Also, I have tried the send_event as well.
Why don't you setup the click event from the button to call the OMNIEVENT of the screen and then call the program from that area?
Just make sure that the program has a 'return' in there and then you won't have to worry about setting the focus from the program that you called. When the 'return' executes, you can set the focus for the prompt that you want from withing the OMNIEVENT.
Let me know if that helps.
Bruce,
I would like to point out that you might have misunderstood my previous answer…
It looks to me as if you're trying to give focus to a certain control in a window. In order to do that use
Set_Property( @window:'.FERT_JV_BUILD' , 'FOCUS' , 1 )
and not
Set_Property('SYSTEM','FOCUS',@window:'.FERT_JV_BUILD')
The set_property should also be one of the last things that the procedure executes before a return.
Hope that helps,
Dave
You say "the program continues to execute". Does this imply that you aren't ending the CLICK event handler with RETURN 0 right after the set_property command? If not, my experience is that the expected behavior would be for your program to finish and then focus going to FERT_JV_BUILD.
John