P: n/a

hi,
how would u do a count for somthing that is checked, in a check box?? this
is wat i've got so far, but its coming out with an error;
=DCount("Available","tblFilm","[Available]='Checked'")
i;ve tried changed checked to true, but its the same error. i'm trying to
get it to count the number of checks in the boxes.
dev  
Share this Question
P: n/a

Hi:
Since "checked"=true=1, just sum the field, then take the absolute value:
=abs(sum([available])
If you're doing it in a report, the above will suffice if used in a
grouped section or report footer. If in a query I guess you could use
dsum()
HTH
Jan
DP wrote: hi,
how would u do a count for somthing that is checked, in a check box?? this is wat i've got so far, but its coming out with an error;
=DCount("Available","tblFilm","[Available]='Checked'")
i;ve tried changed checked to true, but its the same error. i'm trying to get it to count the number of checks in the boxes.
dev  
P: n/a

sorry, so wat would it be, ;
=abs(sum([Available],"tblFilm")
i tried the above, it dont work.
i've just got it on a statistics form. i'm tryin to count teh number of
checks.
dev
"Jan" <ja*@stempelconsulting.com> wrote in message
news:11*************@corp.supernews.com... Hi:
Since "checked"=true=1, just sum the field, then take the absolute value: =abs(sum([available])
If you're doing it in a report, the above will suffice if used in a grouped section or report footer. If in a query I guess you could use dsum()
HTH
Jan
DP wrote: hi,
how would u do a count for somthing that is checked, in a check box?? this is wat i've got so far, but its coming out with an error;
=DCount("Available","tblFilm","[Available]='Checked'")
i;ve tried changed checked to true, but its the same error. i'm trying to get it to count the number of checks in the boxes.
dev  
P: n/a

Hello DP,
Perhaps another way around your problem is
to create an extra field in your query such as
SumYes: IIf([Available]=1,1,0)
Then, Sum([SumYes]) would be the final
expression. This would sum all of the 1's
in that column. Hope you understand what
I'm saying. I use this method all the time.
If put on a form, place Sum([SumYes]) in
the footer for your form to show your total.
Regards  
P: n/a

sorry, that seems too complicated.
i was thinking of just using the expression builder, like the person before
suggested.
i have a statistics form, where i wanted the user, to see how many films are
available and how many arent.
i've got other fields, which are very similar, and i just wanted a quick and
easy method of doing it.
i've not got a query to process any of teh above, its just a form, created
from a customer table. ive got;
=abs(sum([Available],"tblFilm")
so far, and it aint workin. is there anything similar to that i can use?
thanx
dev
"inkman04" <ra*******@yahoo.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com... Hello DP,
Perhaps another way around your problem is to create an extra field in your query such as
SumYes: IIf([Available]=1,1,0)
Then, Sum([SumYes]) would be the final expression. This would sum all of the 1's in that column. Hope you understand what I'm saying. I use this method all the time.
If put on a form, place Sum([SumYes]) in the footer for your form to show your total.
Regards  
P: n/a

sorry,. i done it now. it was
=Abs(DSum("Available","tblFilm"))
but how would i count them, if they are not checked?
dev
"DP" <DP@hotmail.com> wrote in message
news:uc******************@newsfe6gui.ntli.net... sorry, that seems too complicated. i was thinking of just using the expression builder, like the person
before suggested.
i have a statistics form, where i wanted the user, to see how many films
are available and how many arent. i've got other fields, which are very similar, and i just wanted a quick
and easy method of doing it.
i've not got a query to process any of teh above, its just a form, created from a customer table. ive got;
=abs(sum([Available],"tblFilm")
so far, and it aint workin. is there anything similar to that i can use?
thanx
dev
"inkman04" <ra*******@yahoo.com> wrote in message news:11*********************@g43g2000cwa.googlegro ups.com... Hello DP,
Perhaps another way around your problem is to create an extra field in your query such as
SumYes: IIf([Available]=1,1,0)
Then, Sum([SumYes]) would be the final expression. This would sum all of the 1's in that column. Hope you understand what I'm saying. I use this method all the time.
If put on a form, place Sum([SumYes]) in the footer for your form to show your total.
Regards
 
P: n/a

That would be (the total recordcount)  (the abs(dSum...))
"DP" <DP@hotmail.com> wrote in message
news:eo******************@newsfe5gui.ntli.net... sorry,. i done it now. it was
=Abs(DSum("Available","tblFilm"))
but how would i count them, if they are not checked?
dev
"DP" <DP@hotmail.com> wrote in message news:uc******************@newsfe6gui.ntli.net... sorry, that seems too complicated. i was thinking of just using the expression builder, like the person before suggested.
i have a statistics form, where i wanted the user, to see how many films are available and how many arent. i've got other fields, which are very similar, and i just wanted a quick and easy method of doing it.
i've not got a query to process any of teh above, its just a form, created from a customer table. ive got;
=abs(sum([Available],"tblFilm")
so far, and it aint workin. is there anything similar to that i can use?
thanx
dev
"inkman04" <ra*******@yahoo.com> wrote in message news:11*********************@g43g2000cwa.googlegro ups.com... > Hello DP, > > Perhaps another way around your problem is > to create an extra field in your query such as > > SumYes: IIf([Available]=1,1,0) > > Then, Sum([SumYes]) would be the final > expression. This would sum all of the 1's > in that column. Hope you understand what > I'm saying. I use this method all the time. > > If put on a form, place Sum([SumYes]) in > the footer for your form to show your total. > > Regards >
 
P: n/a

thanx man, i done it.
dev
"Mal" <me@myhome.net> wrote in message
news:47***************@newsread1.news.atl.earthlin k.net... That would be (the total recordcount)  (the abs(dSum...))
"DP" <DP@hotmail.com> wrote in message news:eo******************@newsfe5gui.ntli.net... sorry,. i done it now. it was
=Abs(DSum("Available","tblFilm"))
but how would i count them, if they are not checked?
dev
"DP" <DP@hotmail.com> wrote in message news:uc******************@newsfe6gui.ntli.net... sorry, that seems too complicated. i was thinking of just using the expression builder, like the person before suggested.
i have a statistics form, where i wanted the user, to see how many
films are available and how many arent. i've got other fields, which are very similar, and i just wanted a
quick and easy method of doing it.
i've not got a query to process any of teh above, its just a form, created from a customer table. ive got;
=abs(sum([Available],"tblFilm")
so far, and it aint workin. is there anything similar to that i can
use?
thanx
dev
"inkman04" <ra*******@yahoo.com> wrote in message news:11*********************@g43g2000cwa.googlegro ups.com... > Hello DP, > > Perhaps another way around your problem is > to create an extra field in your query such as > > SumYes: IIf([Available]=1,1,0) > > Then, Sum([SumYes]) would be the final > expression. This would sum all of the 1's > in that column. Hope you understand what > I'm saying. I use this method all the time. > > If put on a form, place Sum([SumYes]) in > the footer for your form to show your total. > > Regards >
  This discussion thread is closed Replies have been disabled for this discussion.   Question stats  viewed: 9150
 replies: 7
 date asked: Feb 17 '06
