The code below is for a check box that is in a form controlling if a volunteer in my volunteers database has a relationship with another and if so it keeps my reports from creating duplicates. (if this makes sense).
Private Sub AddressShare_AfterUpdate()
Dim intShared As Integer
Dim intVolunteerID As Integer
Dim strCriteria As String
intVolunteerID = Forms!Volunteers!VolunteerID
strCriteria = "[VolunteerID]= & intVolunteerID"
intShared = DCount("[VolunteerID]", "Relations", strCriteria)
If intShared > 1 Then
MsgBox "This person already shares one address.
Volunteers cannot share two of the same addresses.
This will create duplicates!"
ElseIf intShared = 1 Then
quick question...the prompt works however it only gives me a choice of "OK" and goes ahead and fills in the check box. i want the prompt to ask if they want to have duplicates and i need it to be two options: