dec2408.doc
i want if user click on save button all the data should store on Mr table But product_name,product_id is not storing properly.
Kindly help me
Private Sub Command1_Click()
' Debug.Assert False
On Error GoTo cancel
Set rs1 = New Recordset
rs1.Open " SELECT * FROM MR ", con, adOpenDynamic, adLockOptimistic
' rs1.Open " SELECT * FROM MR WHERE Grd.Col = '" & Grd.TextMatrix(Grd.Row, cItemCode) & "' ", con, adOpenDynamic, adLockBatchOptimistic
rs1.AddNew
rs1.Fields(1) = Combo1.Text
rs1.Fields(2) = Text1.Text
rs1.Fields(3) = Text2.Text
rs1.Fields(4) = Text3.Text
rs1.Fields(5) = Text4.Text
rs1.Fields(6) = DTPicker2.Value
rs1.Fields(7) = CStr(Text6.Text)
rs1.Fields(8) = Text7.Text
rs1.Fields(9) = DTPicker1.Value
rs1.Fields(10) = Text13.Text
rs1.Fields("qty") = FlexGridEditor.Value
rs1.Fields("Product_name") = Grd.TextMatrix(Grd.Row, cItemName) & vbNullString
rs1!ProductName = Grd.TextMatrix(Grd.Row, cItemName) & vbNullString
rs1.Update
MsgBox ("Commit")
rs1.Close
done:
Exit Sub
cancel:
MsgBox Err.Number
MsgBox Err.Description
Resume done
End Sub