What I want to do is after they select an Equipment ID say 8007 LHD, it looks in the [OPEN EVENTS] Query for that EQ ID. Of course, if it already exists to undo everything and require a close of existing event before moving forward.
Main form is [Event Dashboard] subform is [Create Event]
Code:
Private Sub EQ_ID_AfterUpdate()
If DCount("*", "[Open Events]", "[EQ ID]'" & Forms![Event Dashboard]![Create Event]![EQ ID]) > 0 Then
MsgBox "There is already an Active Event for this Equipment. Please Close existing event before logging another!"
Me.Undo
Cancel = True
End If
End Sub
Keep getting syntax errors on this. And not entirely sure on the calling from a subform is right either.
Thanks for help.
If anyone knows of a good place that has a list of syntax help that would be awesome as well.