This tutorial allows you to create an InfoPath template part (XTP) that will lock and unlock forms that are stored in DBXL. You can reuse this XTP in any form template where you wish to provide this functionality to your users.
Click download above to obtain the PDF.