|
|
Re: what is the Built-in for canel query,if it should be controlled programtically [message #85346 is a reply to message #85345] |
Thu, 17 June 2004 07:08   |
Prick
Messages: 11 Registered: June 2004
|
Junior Member |
|
|
hi,
It works fine, it cancels query
but i have some points
when ever i press canel query
1. it give a error message
"FRM-41009 Function key not allowed, press cntrl + F1 for the list of valid key's"
2.another message following previous one
"Frm- 40353 query cancelled"
3.I am having key-exit assciated with each of my screen
for some other purpose, but i am using
Exit_form(ask_commit , to_savepoint);
but it only works
when i give
Exit_form(no_validate);
if i use this one the form will be exited and it will
never ask to commit even if it holds the records which need to be committed, and it will never rollback as well.
So what to do
Guide me please, Mr. Himanshu
Ram
|
|
|
Re: what is the Built-in for canel query,if it should be controlled programtically [message #85353 is a reply to message #85346] |
Thu, 17 June 2004 22:29   |
Himanshu
Messages: 457 Registered: December 2001
|
Senior Member |
|
|
Hi,
For your #1
Create a trigger On-error in your Form and add following code:
Begin
if Error_Code = 41009
And :System.Block_status <> 'QUERY' Then
NULL;
End If;
End;
For #2 there is no need of any change.This is a Default informative message.
I could not understand your problem #3.
Are you pressing Cntrl+q.
Try changing the Exit form code as follows:
If :System.Form_status='CHANGED' Then
Exit_form;
Else
Exit_form(No_Validate);
End;
HTH
Regards
Himanshu
|
|
|
Re: what is the Built-in for canel query,if it should be controlled programtically [message #85356 is a reply to message #85353] |
Thu, 17 June 2004 23:56   |
Prick
Messages: 11 Registered: June 2004
|
Junior Member |
|
|
hI, HIMANSHU,
According to your suggestion i will supress these two messages in on-error trigger that is fine, OK
Regarding third point
Yes i am using cntrl+q for canceling query because the requirements say's that user should be allowed to canel the query in both way's, either by pressing the the canel query menu item or by pressing relevant function key.
I applied the DO_KEY('exit_form') in the menu item code and i used exit_form(no_validate)
in the key-exit , that's why it works fine when ever user presses menu icon to canel the query.
But if he presses cntrl+q
form suppose to execute the code written in key-cquery
in that trigger i have pasted the same code(ie. enabling /disabling perticular menu items and exit_form built in) as i have done in menu item code
but it does not fire.
i can conclude that i am still not able to achieve the desired functionality after pressing cntrl+q
could you look into it
if i am not able to explain you exactly please ask me i will explain you again
Ram
|
|
|
Re: what is the Built-in for canel query,if it should be controlled programtically [message #85362 is a reply to message #85356] |
Fri, 18 June 2004 02:47   |
Himanshu
Messages: 457 Registered: December 2001
|
Senior Member |
|
|
Dear Ram,
key-cquery is meant to add Count_query built in & not cancelling the query.
It is the Key-exit trigger which is supposed to fire if you press Cntrl+q or press cancel query button.
If your Form is in enter query mode & you press cntrl+q then it will make it in normal mode.
If you are in Normal mode & press control+q then it will close the form.
So please let me know where you are facing problem.
HTH
Regards
Himanshu
|
|
|
Re: what is the Built-in for canel query,if it should be controlled programtically [message #85369 is a reply to message #85362] |
Fri, 18 June 2004 05:31  |
Prick
Messages: 11 Registered: June 2004
|
Junior Member |
|
|
Hi , Himanshu
I am agreed with you, i also found the same thing as you mentioned, when i was debugging the form.
Key-Exit trigger fires when ever i press cntrl+q
and that only canels the query if the mode is
enter-query, key-cqry does not.
I am supressing the error message 41009, and
cancel query icon and cntrl+q is working fine.
I am very thankfull to you that you helped me a lot in this regard.
I am implementing the same logic in all of my screen
but still testing is remaining
i will come back to you if i stuck any where in the testing regarding this cancel query operation
Thanks a lot again
Ram
|
|
|