I have an impending disaster guys! I have a purchase order system that if an order is over a certain value a manager is required to enter an authorisation number. The manager obtains this from a table and ticks a box to a) issue it, and b) so that it cannot be re-used.
The authorisation field on the form takes this number, looks up the check table (called pincheck) and if it exists, and has not been used up, it inserts it and allows the user to move through the form.
This is the code on the after_update event of the authorisation number field (which is only made visible if the order value is >50):
Dim sPin As String
sPin = Nz(DLookup("pin", "pincheck", "not deleted"))
If sPin = Me.Text62 Then
MsgBox "Valid PIN entered - please proceed with order", vbInformation, "RF Materials Ordering"
Me.Order_number.Visible = True
MsgBox "Invalid PIN entered - please check and try again", vbCritical, "RF Materials Ordering"
It's behaviour is erratic - now it seems to have stopped working. Any help REALLY needed guys!