Selasa, 13 September 2011

RE: [MS_AccessPros] Re: Logic/SQL/Checkbox issue.. I have 5 chkboxes need to know if more than 1 is chec

 

Funny how sometimes we get it an some times we don't. :-)

Liz Ravenwood
Database Developer / Programmer
Super First Class Products
B/E Aerospace
O: 1.520.239.4808
www.beaerospace.com

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Bill Mosca
Sent: Tuesday, September 13, 2011 1:14 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Re: Logic/SQL/Checkbox issue.. I have 5 chkboxes need to know if more than 1 is chec

Liz

I tell my wife my dad thought I was so bright he called me "Sun". She says, "That's 'son', dummy!"

Bill

--- In MS_Access_Professionals@yahoogroups.com, Liz Ravenwood <liz_ravenwood@...> wrote:
>
> Bill, you are brilliant. Btw... I'm snagging that code for when a report has no data bit. That's good stuff too.
>
> Liz Ravenwood
> Database Developer / Programmer
> Super First Class Products
> B/E Aerospace
> O: 1.520.239.4808
> www.beaerospace.com
>
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Bill Mosca
> Sent: Tuesday, September 13, 2011 1:03 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Re: Logic/SQL/Checkbox issue.. I have 5 chkboxes need to know if more than 1 is chec
>
> Terence
>
> Try this:
> SELECT *
> FROM tbl_profile
> WHERE (AI + AS + AA + NH + WH) < -1
>
> If only one is selected the outcome would be -1. If more than one are selected the sum would be anywhere from -2 through -5.
>
> The above would of course need to be edited if you ever added another ethinic field.
>
> Regards,
> Bill Mosca, Founder - MS_Access_Professionals
> http://www.thatlldoit.com
> Microsoft Office Access MVP
> https://mvp.support.microsoft.com/profile/Bill.Mosca
>
>
> --- In MS_Access_Professionals@yahoogroups.com, "Terence" <buffalome90210@> wrote:
> >
> > I dont have a lot of room to move on this issue because I am dealing with Fed Standards. I have 5 check boxes, as follows
> >
> > American Indian or Alaskan native
> > Asian
> > African American
> > Native Hawaiian or Other Pacific Islander
> > White
> >
> > I pass the data several times with a typical query such as:
> >
> > mysql = "select * from tbl_profile where (AI = True and AS = False and AA = False and NH = False and WH = False)"
> >
> > I have to allow the partipant to click more than one box (Fed Standard)
> >
> > I need a query to select when more than one of the boxes is checked.
> >
> > I can't use a custom control because I must allow multiple selections.
> >
> > If I have to I could put some logic in, but I was hoping to find a better way.
> >
> > all i can see is something like
> >
> > COUNT = 0
> > If AI = true then COUNT = COUNT + 1
> > If AS = true then COUNT = COUNT + 1
> > If AA = true then COUNT = COUNT + 1
> > If NH = true then COUNT = COUNT + 1
> > If WH = true then COUNT = COUNT + 1
> >
> > If COUNT > 1 then
> > msgbox("I got more than 1 box")
> > endif
> >
> >
> > ANY SUGGESTIONS ?
> > Terence
> >
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
> This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
>

------------------------------------

Yahoo! Groups Links

This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.


A bad score is 598. A bad idea is not checking yours, at freecreditscore.com.
.

__,_._,___

Tidak ada komentar:

Posting Komentar