B
billy_pit
Hi,
My project is in MS Access 2002.
In that one form of data entry I am using this code for validation of
feild.
Private Sub CustomerCode_Combo_LostFocus()
If Me.CustomerCode_Combo = "" Or IsNull(Me.CustomerCode_Combo) Then
strMsg = "You must select Customer Code from the ComboBox."
strTitle = "CustomerCode Required"
intStyle = vbOKOnly
MsgBox strMsg, intStyle, strTitle
Me.CustomerCode_Combo.Undo
Me.CustomerCode_Combo.SetFocus
End If
End Sub
Its not working properly.
only First time whenever I lostfocus of this feild and go to next
field to this field then it shows msg whatever I enter in
validation.But even if I used that line
Me.CustomerCode_Combo.Undo
Me.CustomerCode_Combo.SetFocus
its not setfocus to that feild again and its useless.
And I can go further even validation is not correct.
I don't know what's the problem?
My project is in MS Access 2002.
In that one form of data entry I am using this code for validation of
feild.
Private Sub CustomerCode_Combo_LostFocus()
If Me.CustomerCode_Combo = "" Or IsNull(Me.CustomerCode_Combo) Then
strMsg = "You must select Customer Code from the ComboBox."
strTitle = "CustomerCode Required"
intStyle = vbOKOnly
MsgBox strMsg, intStyle, strTitle
Me.CustomerCode_Combo.Undo
Me.CustomerCode_Combo.SetFocus
End If
End Sub
Its not working properly.
only First time whenever I lostfocus of this feild and go to next
field to this field then it shows msg whatever I enter in
validation.But even if I used that line
Me.CustomerCode_Combo.Undo
Me.CustomerCode_Combo.SetFocus
its not setfocus to that feild again and its useless.
And I can go further even validation is not correct.
I don't know what's the problem?