Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Please help with multiple choise

Geek News

Please help with multiple choise
MN 12/22/2008 2:58:00 PM
If Ct1=1 then st=1
if Ct2=1 then st=2
if ct3=1 then st=3
if ct4=1 then st=4
if ct5=1 then st=6
If more than one of above marked then st=5.
How can I do that in VB ?
Thank you all in advance!
Re: Please help with multiple choise
"Mike Painter" <mddotpainter[ at ]sbcglobal.net> 12/22/2008 5:37:03 PM
MN wrote:
[Quoted Text]
> If Ct1=1 then st=1
> if Ct2=1 then st=2
> if ct3=1 then st=3
> if ct4=1 then st=4
> if ct5=1 then st=6
> If more than one of above marked then st=5.
> How can I do that in VB ?
> Thank you all in advance!
Dim count as Integer
Count = 0
If Ct1=1 then
st=1
Count = Count + 1
End If
If Ct2=1 then
st=2
Count = Count + 1
End If

All teh way down.

If Count > 1 then
st=5
end if




Re: Please help with multiple choise
MN 12/22/2008 6:30:00 PM
Wow, good advice. I will try it.
Thanks you for reply.

"Mike Painter" wrote:

[Quoted Text]
> MN wrote:
> > If Ct1=1 then st=1
> > if Ct2=1 then st=2
> > if ct3=1 then st=3
> > if ct4=1 then st=4
> > if ct5=1 then st=6
> > If more than one of above marked then st=5.
> > How can I do that in VB ?
> > Thank you all in advance!
> Dim count as Integer
> Count = 0
> If Ct1=1 then
> st=1
> Count = Count + 1
> End If
> If Ct2=1 then
> st=2
> Count = Count + 1
> End If
>
> All teh way down.
>
> If Count > 1 then
> st=5
> end if
>
>
>
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net