This site is so good. Glad to have help at my finger tips. All a learning process for me. Anyway
I actually got somewhere with some code,
Private Sub txtAcquisitionNo_BeforeUpdate(Cancel As Integer)
If Len(txtAcquisitionNo.Text) > 6 Then
MsgBox "Incorrect Length"
Cancel = vbCancel
End If
If IsNull(txtAcquisitionNo) Or (txtAcquisitionNo) = "" Then
MsgBox "Cant be Blank"
Cancel = vbCancel
End If
End Sub
Private Sub txtAcquisitionNo_Change()
If Len(txtAcquisitionNo.Text) > 6 Then
MsgBox "Incorrect Length"
End If
End Sub
BUT
Found out it only works after i type in a number and then delete it. I wont it to work so you cant move on to the next field until you have entered a number!
Thanks
I actually got somewhere with some code,
Private Sub txtAcquisitionNo_BeforeUpdate(Cancel As Integer)
If Len(txtAcquisitionNo.Text) > 6 Then
MsgBox "Incorrect Length"
Cancel = vbCancel
End If
If IsNull(txtAcquisitionNo) Or (txtAcquisitionNo) = "" Then
MsgBox "Cant be Blank"
Cancel = vbCancel
End If
End Sub
Private Sub txtAcquisitionNo_Change()
If Len(txtAcquisitionNo.Text) > 6 Then
MsgBox "Incorrect Length"
End If
End Sub
BUT
Found out it only works after i type in a number and then delete it. I wont it to work so you cant move on to the next field until you have entered a number!
Thanks