This content has been marked as final. Show 4 replies
you don't really need a create_record statment, you just assign the values to the block and put a next_record statement in your loop
you also might want to clean up and if the last record is blank, delete it or move focus to first_record.
like the previous reply, sort of difficult assisting when we don't know all the particulars.
The problem i experience is the FRM-40102.The "FRM 40102 Records must be inserted or deleted first" error implies that you already have a "New" record/row in your form so when you call the CREATE_RECORD built-in Forms is telling you that you haven't met the minimum required values for the current "new" record so you can't create a new one.
As Frm40735 suggests (nice choice of name, by the way), rather than use the Create_Record, I recommend you check to see if the row the cursor is on is a new record before attempting to create a new record. Your code would look something like this:
Hope this helps,
GO_BLOCK('BLOCK'); FOR reg in cursor LOOP .. .. if reg.value = 'S' then If (:system.record_status != 'NEW') THEN create_record; END IF; :BLOCK.VALUE = 'S'; end if; .. .. END LOOP close cursor; Exception when others close cursor;
If someone's response is helpful or correct, please mark it accordingly.