>HI. Arnon.
>
>In reply to your question let-me put things this way. I have a invoice form created with FORM WIZARD. The invoice number must be sequencial to avoid customer from creatting today invoice 1023 and tomorrow 1020. So i decided that the best way to avoid this is to create a related table where a put all the documents numbers. What i need is to when the client is recording a new invoice is a mirror from the documents table plus one, so there can't be no index violattions, and when he finish to save the new invoice number in the documents table. It seems pretty nice and simple, but once i created the form with WIZARD the New/Save button that's work like this. And now?? TIA
when they save the invoice, add code to update the invoice counter
something like
if this.addrecord
savebutton::click
select uniqueid
replace uniqueid.idnumber with uniqueid.idnumber + 1
endif