I have a form with a checkbox. There can only be one record in the record source table marked as the default record. If the user attempts to make a checkbox true for a record when another record is already marked as true I want the user to get a warning letting them know that there is already a default record.
Here is what I have but it is not working:
Private Sub chkbxDefaultSig_BeforeUpdate(Cancel As Integer)
Dim strCriteria As String
strCriteria = "Initials = " & Me.txtInitials
If DCount("DefaultSig", "tblSignatures", strCriteria) > 0 Then
MsgBox "Warning: A default signature has already been selected."
Cancel = True