beginner needs query help

  • Thread starter Thread starter btech1
  • Start date Start date
B

btech1

Guest
I have a db set up to collect yes/no values by checking check boxes for either yes or no. This is done for several fields on an audit sheet. Now I need to take that data and perform a query that will generate and end result of monthly percentage compliance (those fields checked "yes"). Initially I had all yes and no values in my db, so I performed an update query and changed those to 1=yes, 2=no to get numerical values. I then did a count query. This one gives me a total count of all "yes" fields checked. I am having trouble getting a data range from this one. I then made another query to calcuale the percentage marked "yes" by month. I think I have multiple things going on but I think they are all minor to some one who does this everyday. Please help me.... I want tosimplify something not meant to be this hard! :(
 
btech1 said:
Now I need to take that data and perform a query that will generate and end result of monthly percentage compliance (those fields checked "yes").
This was the point it got hard for me to read. You just want the percent of records that are yes, out of all the records for some month?
btech1 said:
Initially I had all yes and no values in my db, so I performed an update query and changed those to 1=yes, 2=no to get numerical values. I then did a count query. This one gives me a total count of all "yes" fields checked. I am having trouble getting a data range from this one.
I wouldn't wonder. It seems to me like you want 'yes' to be equal to 1 and 'no' to be equal to 0. This way you can sum the column, divide it by number of records, and you have your percent.
btech1 said:
I then made another query to calcuale the percentage marked "yes" by month.
then i got confused. isn't this what you meant by "end result of monthly percentage compliance (those fields checked 'yes')"?

Anyway, I suggest you start by changing the table's columns. yes=1, no=0. Then read the helpfiles for dcount and dsum functions.
 
Hmm

So what are you trying to do exactly?

It sounds like you want to group they values by YES and NO, with a count of all records in each group, within a specified date range. Is that correct?

If so, open a new query using the table in question and click on view...then totals. see what you can do with this. If you have issues with it. Post them.

If I'm not understanding the problem please elaborate.
 

Users who are viewing this thread

Back
Top Bottom