I have a textbox on a form with the following code for preventing data entry that doesn't meet certain criteria. However, whenever it exits this procedure I get the Error 3270 "Property not found" error. It only shows up if the Cancel = True command is executed. If it's not there the if statement will execute but the error message will not display. I am using Access 2007 but programming for 2003 use. Any suggestions of what I'm doing wrong?
Private Sub TQty1_BeforeUpdate(Cancel As Integer)
If (TQty1 >= TQty2 And TQty2 <> "") Or (TQty1 = "" And TQty2 <> "") Then
MsgBox "Qty1 must be < Qty2!", vbCritical, "INPUT ERROR"
Cancel = True
End If
End Sub
aslrunner
Private Sub TQty1_BeforeUpdate(Cancel As Integer)
If (TQty1 >= TQty2 And TQty2 <> "") Or (TQty1 = "" And TQty2 <> "") Then
MsgBox "Qty1 must be < Qty2!", vbCritical, "INPUT ERROR"
Cancel = True
End If
End Sub
aslrunner