G
Guest
I have an error-DB for machines. I don’t want users to insert duplicates if
the error isn’t solved. Therefor the code has to look in the field ‘Datum
gereed’ (a date field). If the error is solved there will be a date in this
field.
Who can help me to rebuild the code?
Private Sub Objectnr_BeforeUpdate(Cancel As Integer)
If (Not IsNull(DLookup("[Objectnr]", _
"Storingen", "[Objectnr] ='" _
& Me!Objectnr & "'"))) Then
MsgBox "Storing is reeds ingevoerd, controleer de status."
Cancel = True
Me!Objectnr.Undo
End If
End Sub
the error isn’t solved. Therefor the code has to look in the field ‘Datum
gereed’ (a date field). If the error is solved there will be a date in this
field.
Who can help me to rebuild the code?
Private Sub Objectnr_BeforeUpdate(Cancel As Integer)
If (Not IsNull(DLookup("[Objectnr]", _
"Storingen", "[Objectnr] ='" _
& Me!Objectnr & "'"))) Then
MsgBox "Storing is reeds ingevoerd, controleer de status."
Cancel = True
Me!Objectnr.Undo
End If
End Sub