A
AMHodgetts
Hi,
I have a form where people can enter tape details and the value entered into
the text box is compared with a validations table to ensure that the correct
tape number is used. The tape number can be either numeric or alpha. The
code I am using is
Private Sub txtTape0_BeforeUpdate(Cancel As Integer)
If IsNull(DLookup("[Tape Validation]", "[validations]", "[Tape Validation] =
'" & Me.txtTape0 & "'")) Then
MsgBox "Please enter the correct tape number or container name"
Cancel = True ' wont let the user continue
End If
End Sub
I have 20 field that the user can update with tape numbers and each one has
the same code behind it (txttape0 - txttape19).
However, the db has started throwing up error '2001' you cancelled the
previous operation. I have tried this with square brackets and without
square brackets - but still the same. Can anyone help?
Thanks
Ann
I have a form where people can enter tape details and the value entered into
the text box is compared with a validations table to ensure that the correct
tape number is used. The tape number can be either numeric or alpha. The
code I am using is
Private Sub txtTape0_BeforeUpdate(Cancel As Integer)
If IsNull(DLookup("[Tape Validation]", "[validations]", "[Tape Validation] =
'" & Me.txtTape0 & "'")) Then
MsgBox "Please enter the correct tape number or container name"
Cancel = True ' wont let the user continue
End If
End Sub
I have 20 field that the user can update with tape numbers and each one has
the same code behind it (txttape0 - txttape19).
However, the db has started throwing up error '2001' you cancelled the
previous operation. I have tried this with square brackets and without
square brackets - but still the same. Can anyone help?
Thanks
Ann