|
|
|
|
Re: how to execute the last query fired on form when somene press CANCEL button [message #146385 is a reply to message #145983] |
Thu, 10 November 2005 02:20   |
sanaafridi
Messages: 50 Registered: August 2005 Location: pakistan
|
Member |
 
|
|
good day, sir
1) In the IF--part of your code if the last query don't have the 'WHERE' clause then how can i hard code the 'WHERE 1=1' or anything here as i can't predict it how the last query was, and if it don't have the where clause then how can i execute my last query.see the followinh exmp
Exmp.
i have created a single block of DEPT table and there are ADD and CANCEL and EXECUTE button.
now i press EXECUTE button so all records displayed then i prees ADD to add new record so create_record built_in executed behind the ADD button but then user change his mind and press CANCEL button now i have written the code on CANCEL button, in which i capture the last_query
now the last query don't have WHERE clause as it a simple 'seelct deptno,dname,loc from emp' so how can i execute
this last query on that block
regards
sana
Upd-mod: remove blank lines
[Updated on: Thu, 10 November 2005 21:54] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: how to execute the last query fired on form when somene press CANCEL button [message #580454 is a reply to message #580451] |
Sun, 24 March 2013 16:18   |
 |
D_ORA
Messages: 32 Registered: November 2012 Location: UK
|
Member |
|
|
FIRST OF ALL BUNDLE OF THANKS Littlefoot ..FOR YOUR SHARP REPLY..
SIR ,
I HAVE TWO BLOCKS B1 AND B2 BOTH I KEPT WITH WHERE CLAUSE CONDITION AT FORM LEVEL AS WELL.
BUT WHEN I AM RUNING THE FORM ,I AM GETTING THE FRM-41009 FUNCTION KEY NOT ALLOWED PRESS F8 FOR KEYS LIST ..I ALREADY TRAPPED THE FRM-41009 ERROR BY ON-ERROR KEY TRIGGER...INFACT MY FORM IS OPENING IN QUERY-MODE AND I AM ENTERING THE JOB_CODE AND PRESSING THE EXECUTE BUTTON TO RUN THE QUERY..IT IS DISPLAYING THE DATA PROPERY ..BUT WHEN I AM PRESSING TWO TIMES F11 TO BRINING THE LAST EXECUTED JOB_CODE EVEN IT IS DISPLAYING THE LAST EXECUTED JOB_CODE IN THE JOB_CODE_FIELD AT THAT TIME THE FORM AGAIN GOING TO QUERY_MODE,BUT WHEN I AM GOING TO EXECUTE AGAIN THE LAST JOB_CODE IT IS NOT FETCHING THE DATA.AND FORM STILL IN THE QUERY_MODE AND PRESSING THE EXECUTE BUTTON NO AFFECTS...
ANY HELP IN THIS REGARD WILL BE APPRECIATED.
THANKS IN ADVANCE FOR YOUR SHARP REPLY.
[Updated on: Sun, 24 March 2013 16:20] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: how to execute the last query fired on form when somene press CANCEL button [message #580608 is a reply to message #580566] |
Tue, 26 March 2013 02:31  |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Quote:When I am not using the ENTER_QUERY in KEY-ENTQRY then it working fine
So - don't use it!
Anyway, on a second thought: I'd say that you don't need that trigger at all. Here's why: if you created a master-detail form (that IS your form, right?) using Data Block Wizard, Forms would create all necessary triggers and procedures for you. Once you run such a form, it would work perfectly well.
There's no need to code "enter query" because Forms knows how to do that. It also clears a block for you (therefore, no need for CLEAR_BLOCK at all).
I'm not sure what you meant by raising an error if :B10.C_CALL_BY = '5'.
Therefore, perhaps you should follow the wizard and make your form work. Let Forms do as much job as possible. Then, if necessary, make the form fancy. You'll probably spoil what Forms did, but that's OK; hopefully, you'll learn something from it.
|
|
|