masterlam > 05-12-12, 10:01 AM
Xuân Thanh > 05-12-12, 10:10 AM
masterlam > 05-12-12, 05:22 PM
Xuân Thanh > 06-12-12, 04:16 PM
Private Sub SoLuong_AfterUpdate()
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("tblDanhMucHang")
rs.Index = "PrimaryKey"
rs.Seek "=", Me.IDHang
If Not rs.NoMatch Then
rs.Edit
If Me.LoaiNhapXuat = "N" Then
rs.Fields(3) = rs.Fields(3) + Me.SoLuong
Else
rs.Fields(3) = rs.Fields(3) - Me.SoLuong
End If
rs.Update
End If
rs.Close
End Sub
khải nguyên > 22-01-13, 02:48 PM