Check Box - string ???

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi,

I look some information how to create If.... then for using four check
boxes.

For example what I did below but it doesn't work.

**********************
Dim strSport as string

strSport = " & me.checkbox1.value = True and me.checkbox2.value = True then

If (strSport) then
.....
.....
End If
************************
Please let me know if this will work ?
 
I'm not sure I understand what you're trying to do.

The "then" is incorrect in your assignment to strSport. However, if you
remove it, then strSport is going to be either the word True or the word
False.

If what you're trying to do is check if all 4 boxes are checked, all you
need is:

If Me.Checkbox1 And Me.Checkbox2 And Me.Checkbox3 And Me.Checkbox4 Then
' They're all true
Else
' One or more is false
End If
 
Back
Top