Have this code
select count(*) into v_count
where schedule_code = :day_off_sched.schedule_code;
If v_count > 0 then
msgbox.show('Schedule Error ', 'The Schedule you entered already exixts.', 'OK');
:day_off_sched.schedule_code := null;
I want this code to fire only on inserting record . not when we query records .
I have this code on key-enter of the schedule code.