Vd: bạn có textbox Date
Private Sub txtDate_LostFocus()
If IsNull(txtDate) Then
MsgBox "Ban phai nhap ngay vao o nay", vbCritical, "Thong bao"
txtDate.SetFocus
Cancel = True
End Sub
Private Sub txtDate_LostFocus()
If IsNull(txtDate) Then
MsgBox "Ban phai nhap ngay vao o nay", vbCritical, "Thong bao"
txtDate.SetFocus
Cancel = True
End Sub
Không có nhận xét nào:
Đăng nhận xét