Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Form Formulas??

Status
Not open for further replies.

mac3

IS-IT--Management
Dec 11, 2001
4
GB
Hi
I'm stuck! had some wonderful help yesterday from pesamystik but need more guidance. Have a Form with kids grades on it for each subject need to add up the A-C grades on the form and place the result on the Form. Help!!

P.S assume Im stupid and tell me where to start!

Thanks Squillions
 
Can you paste the URL for the original post so I can refresh my memory.
 
thanks! original question was to do with the database and
count if statement which worked beautifully.

thread702-177567
 
I think I get it now. Also I did not realize from the previous post that you were working with letter grades (So you don't need to use wildcards- they'll slow the query down). So we can change the SQL on that first post to...

select
count(*)
from
[TableName]
where
[FieldName]="a"

For this post we have a couple of options. (There's more than one way to skin a cat.) First...

select
count(*)
from
[TableName]
where
[FieldName] in ("a", "b", "c")

Second...

select
count(*)
from
[TableName]
where
[FieldName] like ("[a-c]")

Third...

select
count(*)
from
[TableName]
where
[FieldName]="a" or
[FieldName]="b" or
[FieldName]="c"


Any of them should work. I'd use the first one though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top