7
77m.grub
I have 3 checkboxes on a form, and a user can select one *or more* of
the
checkboxes, in any combination. When the user clicks on a command
button, some code is run that builds a SQL Statement based on the
user's checking of the various checkboxes. The code currently reads,
in relevant
part:
If chkOne And Not chkTwo and Not chkThree Then
Do This...
Elseif Not chkOne And chkTwo and Not chkThree Then
Do This...
Elseif Not chkOne And Not chkTwo and chkThree Then
Do This...
Elseif chkOne And chkTwo and Not chkThree Then
Do This...
Elseif chkOne And Not chkTwo and chkThree Then
Do This...
Elseif Not chkOne And chkTwo and chkThree Then
Do This...
Elseif chkOne And chkTwo and chkThree Then
Do This...
Elseif Not chkOne And Not chkTwo and Not chkThree Then
Do This...
End If
Problem is that this is about to become a migraine when I add 7 more
checkboxes, for a total of 10. Ack! Is there a more efficient way
to
do this? Thanks!
Mike
the
checkboxes, in any combination. When the user clicks on a command
button, some code is run that builds a SQL Statement based on the
user's checking of the various checkboxes. The code currently reads,
in relevant
part:
If chkOne And Not chkTwo and Not chkThree Then
Do This...
Elseif Not chkOne And chkTwo and Not chkThree Then
Do This...
Elseif Not chkOne And Not chkTwo and chkThree Then
Do This...
Elseif chkOne And chkTwo and Not chkThree Then
Do This...
Elseif chkOne And Not chkTwo and chkThree Then
Do This...
Elseif Not chkOne And chkTwo and chkThree Then
Do This...
Elseif chkOne And chkTwo and chkThree Then
Do This...
Elseif Not chkOne And Not chkTwo and Not chkThree Then
Do This...
End If
Problem is that this is about to become a migraine when I add 7 more
checkboxes, for a total of 10. Ack! Is there a more efficient way
to
do this? Thanks!
Mike