Peter Paul
Registered User.
- Local time
- Today, 00:06
- Joined
- Jan 1, 2000
- Messages
- 82
Greetings,
I am trying to do something which I think should be fairly straight-forward, but alas I am not getting it. I am creating a form for criminal incident reporting. One block of information, allows for multiple selection of up to three choices, out of a possible 8 options. When the user moves off of the last checkbox, I want to have the program check to make sure that no more than three have been selected.
This is one of the variations I have tried.
Private Sub OffenseInformation_subform_Exit(Cancel As Integer)
TotalCriminal = (Forms!Form!subform.[Field1] + [Field2] + [Field3] + [Field4] + [Field5] + [Field6] + [Field7] + [Field8])
If TotalCriminal <= -4 Then MsgBox "You are only allowed to choose three Criminal Activity Types, Please correct this", vbDefaultButton1
Field1.setfocus
End Sub
Any suggestions would be greatly appreciated.
Thanks yet again,
Peter Paul
I am trying to do something which I think should be fairly straight-forward, but alas I am not getting it. I am creating a form for criminal incident reporting. One block of information, allows for multiple selection of up to three choices, out of a possible 8 options. When the user moves off of the last checkbox, I want to have the program check to make sure that no more than three have been selected.
This is one of the variations I have tried.
Private Sub OffenseInformation_subform_Exit(Cancel As Integer)
TotalCriminal = (Forms!Form!subform.[Field1] + [Field2] + [Field3] + [Field4] + [Field5] + [Field6] + [Field7] + [Field8])
If TotalCriminal <= -4 Then MsgBox "You are only allowed to choose three Criminal Activity Types, Please correct this", vbDefaultButton1
Field1.setfocus
End Sub
Any suggestions would be greatly appreciated.
Thanks yet again,
Peter Paul