
Originally Posted by
pfarnell
No it did not work, seems not to want to user the form field bit.
farnell,
maybe I can issue some help here - are you scanning badges into the system's log when employees enter a corporate building perhaps?
if so, I'm not sure why you have two tables. But at any rate, weekend gave you a domain function, which has a syntax that is relevant to your situation such that:
Code:
Private Sub DelegateReferenceNo_Exit(Cancel As Integer)
If DLookup("DelegateReferenceNo", "CheckIn", _
"CRITERIA HERE") Then
DoCmd.OpenForm "GoodBadge"
Else
DoCmd.OpenForm "DuplicateBadge"
End If
End Sub
To me, the following line of code is unclear:
Code:
"[DelegateReferenceNo] = [DelegateCheckIn]![DelegateReferenceNo]") = Null
what are you trying to do with that? What is [DelegateCheckIn]!?? Is that a form reference? A table? A query?
Just a little more tweaking and you should have it no problem.