This is the code, the recordset name is productdetail an the lock value is 3-optimistic (isn't readonly).
Private Sub CmdOK_Click()
DE.rsProductDetail.Update
'DE.rsProductDetail.Resync
Unload Me
End Sub
Private Sub Form_Load()
Dim var1 As String
Call fSize
nOpt = frmXproduct.Opt 'Get Option
nRec2 = frmXproduct.cRec2 'Get a product code
nRec = frmXproduct.cRec 'Get to detail to modify
Select Case nOpt
Case 1 'add new record
DE.rsProductDetail.AddNew
DE.rsProductDetail(0) = Null
DE.rsProductDetail(1) = nRec2
Case 2 'modify the nRec record
cParam = "ProductDetailID = " + CStr(nRec)
DE.rsProductDetail.MoveFirst
DE.rsProductDetail.Find cParam
End Select
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmXproduct.ReloadList (1) 'reload the listview in other form
End Sub
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only