Count Query

G

Gale Coleman

Hello all,

I have a query that has expressions in it to convert check boxes to numbers.
How would I write an expression in the query that would include pulling the
information out of a field and listing it as text. All the other
expressions are turning check marks into numbers or where statements, but I
can't figure out how to just list what is in the field. The field that I
want to pull the information out of is named other_specify.

following is the current query that works, I just want to add something into
it that pulls the text from the "other_specify" field.

Any help is appreciated!!!
Thanks,
Gale


SELECT Sum(IIf([sexual_assault_fully],1,0)) AS sexual_assault_full,
Sum(IIf([sexual_assault_partial],1,0)) AS sexual_assault_par,
Sum(IIf([sexual_assault_not],1,0)) AS sexual_assault_n,
Sum(IIf([domestic_fully],1,0)) AS domestic_full,
Sum(IIf([domestic_partial],1,0)) AS domestic_par,
Sum(IIf([domestic_not],1,0)) AS domestic_n, Sum(IIf([stalking_fully],1,0))
AS stalking_full, Sum(IIf([stalking_partial],1,0)) AS stalking_par,
Sum(IIf([stalking_not],1,0)) AS stalking_n,
Sum(IIf([program_r_capacity],1,0)) AS program_r_cap,
Sum(IIf([need_not_documented],1,0)) AS need_not_doc,
Sum(IIf([not_eligible],1,0)) AS not_elig, Sum(IIf([limited_resources],1,0))
AS limited_ress, Sum(IIf([not_appropriate],1,0)) AS not_app,
Sum(IIf([transportation],1,0)) AS transport, Sum(IIf([conflict],1,0)) AS
conflic, Sum(IIf([abuse_problems],1,0)) AS abuse_probs,
Sum(IIf([mental_health],1,0)) AS mental_hlth,
Sum(IIf([male_adolescents],1,0)) AS male_adol,
Sum(IIf([inadequate_language],1,0)) AS inadequate_lang,
Sum(IIf([geographic],1,0)) AS geog, Sum(IIf([other],1,0)) AS othe,
Count(zLAV.Casenum) AS CountOfCASENUM
FROM CLIENTSW INNER JOIN zLAV ON CLIENTSW.CASENUM = zLAV.Casenum
WHERE (((CLIENTSW.DOPEN) Between [Enter beginning date] And [Enter ending
date]) AND ((CLIENTSW.FUNDSNUM)=12 Or (CLIENTSW.FUNDSNUM)=13));
 
S

strive4peace

Hi Gale,

you have the tough stuff... now for the easy one ;)

SELECT Sum(IIf([sexual_assault_fully],1,0)) AS
sexual_assault_full, etc, other_specify
FROM ...
WHERE ...


Warm Regards,
Crystal
MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)
 
S

strive4peace

you're welcome, Gale ;) happy to help

Warm Regards,
Crystal
MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top