Home » Developer & Programmer » Forms » Very Urgent
Very Urgent [message #81091] Mon, 06 January 2003 04:24 Go to next message
Aydah
Messages: 11
Registered: November 2002
Junior Member
I have this insert code, after inserting the record it goes to a new record and i want it to stop at the same record which is inserted , please help me!!!
declare
alert number;/*assign a variable to the alert*/

begin

set_alert_property('Show_alert', title, 'Insert Record');/*headings of the alert box*/
set_alert_property('show_alert',alert_message_text,'are you sure you want to insert new record?');/*message of the alert box*/
set_alert_button_property('show_alert',Alert_button1,label, 'Cancel');/*first button is labeled Cancel*/
set_alert_button_property('show_alert',Alert_button2,label, 'OK');/*second button is labeled OK*/
/*if :system.last_record='false' then*/
last_record;
next_record;

alert:=show_alert('show_alert');/*the show_alert will pop up*/

if alert=alert_button2 then/*if user press OK then insert the record*/

FORMS_DDL('INSERT INTO TBL_TRAINERS VALUES(:TBL_TRAINERS.TRAI_TRAINER_NO, :TBL_TRAINERS.TRAI_TRAINER_NAME, :TBL_TRAINERS.TRAI_TRAINER_DOB, :TBL_TRAINERS.TRAI_TRAINER_GENDER, :TBL_TRAINERS.TRAI_JOIN_DATE, :TBL_TRAINERS.TRAI_SALARY, :TBL_TRAINERS.TRAI_TRAINER_HOME_PHONE, :TBL_TRAINERS.TRAI_TRAINER_MOBILE_PHONE, :TBL_TRAINERS.TRAI_TRAINER_FAX');
COMMIT;
else
null;
end if;

end;
Re: Very Urgent [message #81094 is a reply to message #81091] Mon, 06 January 2003 07:18 Go to previous message
Victoria
Messages: 152
Registered: July 2002
Senior Member
You can set the record navigation property of that data block to same record instead next record.
Thanks
Previous Topic: Difference between forms 4.5 and 6i
Next Topic: Any Tool or Method to Find out the Diff in Code betn two forms
Goto Forum:
  


Current Time: Fri Apr 19 04:12:29 CDT 2024