T
trungluu
Guest
Hi,
I have a field on the form. this is a required field. If I gave it a null value,I always got this message:
"The field 'PhieuNhapChiTiet.DVT' cannot contain a Null value because the Required propety for this field is set to true. Enter a value in this field."
I have used the error handling code to trap this error to change it to my own message. But it doesn't work well. the following is my code
Private Sub DVT_BeforeUpdate(Cancel As Integer)
On Error GoTo Err_handler:
MsgBox "Do before update"
Exit_handler:
Exit Sub
Err_handler:
MsgBox "show error"
Resume Exit_handler
End Sub
Could you please tell me are there any wrongs in my code? Should I use DVT_BeforeUpdate event procedure? How to trap this error?
Thanks in advance,
Trung Luu
I have a field on the form. this is a required field. If I gave it a null value,I always got this message:
"The field 'PhieuNhapChiTiet.DVT' cannot contain a Null value because the Required propety for this field is set to true. Enter a value in this field."
I have used the error handling code to trap this error to change it to my own message. But it doesn't work well. the following is my code
Private Sub DVT_BeforeUpdate(Cancel As Integer)
On Error GoTo Err_handler:
MsgBox "Do before update"
Exit_handler:
Exit Sub
Err_handler:
MsgBox "show error"
Resume Exit_handler
End Sub
Could you please tell me are there any wrongs in my code? Should I use DVT_BeforeUpdate event procedure? How to trap this error?
Thanks in advance,
Trung Luu