Private Sub txtOrderNo_AfterUpdate()
If IsNull(cboBNo) Or IsNull(txtLNo) Or IsNull(cboWCType) Or IsNull(cboSType) Then
MsgBox "Please fill in the missing data in the Address Page to Continue !!! "
Me.txtWorkOrderNo10 = Null
Forms!frmMain!MyTabControl.Pages("Info").SetFocus
Exit Sub
ElseIf Not IsNull(cboBNo) And Not IsNull(txtLNo) _
And Not IsNull(cboWCType) And Not IsNull(cboSType) Then
Me.txtOrderN = Nz(Me.txtOrderNo, "0")
If Len(Me.txtOrderNo) = 7 Then '<----- LImits to 7 digits entry
'Do Nothing
Else
MsgBox "You cant enter value less than 7 Digits OR" & vbCrLf & vbCrLf _
& "Zero (0) in the Order Field"
Me.txtOrderNo = Null
Me.txtOrderNo.SetFocus
End If
End If
End Sub
|