I have table VTVSheetingOrderLine that has 2 fields InventBatchID & ItemId. And table VTVSheetingOrderLine related to InventDim, InventTrans, InventBatch. The relations will be like: InventDim.InventDimId = InventTrans.InventDimId InventTrans.InventTransId = VTVSheetingOrderLine .InventTransId InventDim.InventBatchId = InventBatch.InventBatchId. I create form B from table VTVSheetingOrderLine . Add a button "Create Batch Id" on that form. I wrote codes but it seem not enough, because I don't know how to create the relations between those table void clicked() { InventNumGroup inventNumGroup; Num _num; int increment; ...