rainkv > 16-07-15, 07:25 AM
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strCriteria As String
Dim intResponse As Integer
strCriteria = DLookup("[MSo]", "DANHSACHHOCSINH", _
"[MSo] = Form![MSo]")
If DCount("*", "DANHSACHHOCSINH", strCriteria) > 0 Then
MsgBox ("Da bi trung ma hoc sinh.")
Me.Undo
End If
End Sub