Trouble with a create button - sequence

11-20  Source: Network gathering  Views:0 

Advertisement
I have created a sequence to assign to my Staff_id
create sequence staff_id_sequence start with 3; (i have 2 staff already created)
I have a manually created datablock with the information from my staff table
staff_id
s_last name
s_first name
etc.
I have made a create_button which when pressed it should post the next value in the sequence so that I can input a new staff member.
CLEAR_FORM;
SELECT staff_id_sequence.nextval
INTO :staff.staff_id
FROM dual;
SET_ITEM_PROPERTY('SAVE_BUTTON', ENABLED, PROPERTY_TRUE);
When run the form and press create_button nothing happens. If i put a number in the textbox for staff_id and press create_button it gives me the next number in the sequence.
Anyone know why it doesn't run until I fill the box with a number?
hi
try the following..
CLEAR_record;
select staff_id_sequence.nextval into :staff.staff_id
from dual;
set_item_property('save_button',ENABLED,PROPERTY_TRUE);sarah
Related articles