Hi. I have two linked forms. RaceName and Entries. Entries comprises entries for all races. RaceName is details relating to a specific race only. I intended to use the following code to restrict a boat or person being entered twice in the same race in the Entries table.
Private Sub Entries_skipperhandicap_AfterUpdate()
Dim NewHandicapID As String
Dim StLinkCriteria As String
NewHandicapID = Me.HandicapID.Value
StLinkCriteria = "[HandicapID]=" & "'" & NewHandicapID & "'"
If Me.HandicapID = DLookup("[HandicapID]", "tbl_Entries", StLinkCriteria) Then
MsgBox "This Skipper, " & HandicapID & ", Has Already Entered - Can't Enter Twice!" _
& vbCr & vbCr & "Please Check Skipper Name again.", vbInformation, "Duplicate Information"
Me.Undo
End If
End Sub
However, Access is returning runtime error 3078 - can't find table. I suspect this might be problem relating to the form/subform, cant cant figure it. Any ideas?