edojanssen
Registered User.
- Local time
- Today, 20:42
- Joined
- Jun 21, 2006
- Messages
- 23
I'm building a db which holds vehicles and their driver. The form Vehicles has a subform which contains the drivers and the begindate and enddate. What I want is to secure this form so that no duplicate records can be made. If you enter a drivers name there must be a check that the driver is not on another vehicle and no enddate. When the enddate is added, the driver can be selected to be entered on other vehicles.
I already tried but I get a syntax error:
Who can help me out?
I already tried but I get a syntax error:
Code:
If DCount("[Bestuurder]", "qryBestuurderCheck", "[Bestuurder]='" & Forms![sfrmKentekens]![Bestuurder] & "'") Then '> 0 Then
MsgBox "De gekozen bestuurder bestaat al " & _
vbCrLf & "bij een ander kenteken!"
Me.Bestuurder.Undo
Else
End If
Who can help me out?