I added
And Isnull(me.checkBA01) and Isnull(me.checkBA02)...
to the code but it didn't change a thing...
I also tried to replace everything to
'check if at least 1 check box has been checked
If Me.CheckBA01.Value = "" And Me.CheckBA02.Value = "" And Me.CheckBA03Bed.Value = "" _
And Me.CheckBA03Pax.Value = "" And Me.CheckBA04.Value = "" And Me.CheckBA05.Value = "" _
And Me.CheckBA06.Value = "" And Me.CheckBA08Bed.Value = "" And Me.CheckBA08Textil.Value = "" _
And Me.CheckBA09.Value = "" And Me.CheckBA10.Value = "" And Me.CheckBA40.Value = "" _
And Me.CheckBA50.Value = "" And Me.CheckFamily.Value = "" And Me.CheckZB.Value = "" Then
MsgBox "Gelieve minstens 1 afdeling aan te vinken." & vbCrLf & _
"Veuillez choisir au moins 1 département.", vbExclamation
Exit Sub
End If
but this didn't work either... If this is not possible to do it is not too dramatic.
I thought I could use this to be sure a check box had been checked. However, now the user will get the message box from the end of the code that tells him the record has been added for the selected department. None of them is chosen, so none of them has been added... This is not a lie, but just a little bit stupid. Getting a message box that tells you to records have been added, while nothing happened because you didn't make a choice in the check boxes...
|