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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement