IF USED("barcno") USE IN barcno ENDIF IF NOT USED("barcno") SELECT 0 USE barcno endif select barcno nBarc=barcno.barcno IF nBarc <= 0 MESSAGEBOX("This computer is not setup with barcode numbers","") RETURN ENDIF IF RLOCK('barcno') replace barcno with nBarc+1 UNLOCK else MESSAGEBOX("The barcodes numbering file is in use, plese try again","") RETURN ENDIF FLUSH in barcno force IF USED("barcno") USE IN barcno ENDIF