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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Report Help

Status
Not open for further replies.

clansullivan

Programmer
Jul 18, 2005
7
US
I am not familiar with SQL in Access but I need to do the following:

Given a simple select statement, I need to determine the percentage of those records that have the value "Excellent" in one of two possible fields.

I do not care if it is done in the report or in the query itself.

How do I do this?

thanks
 
Display your report footer or header section and add a text box. Set the control source to something like:

=Sum(Abs(Field1="Excellent" OR Field2="Excellent"))/Count(*)

If this doesn't work, then come back with your attempted expression.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanks - but all that happens is that I get prompted for values when the report is run. Here are my field names and formula as it appears in the textbox


=Sum(Abs(Students.ADeconOverall ="Excellent" OR Students.BDeconOverall="Excellent"))/Count(*)
 
Your report needs to be bound to the Students table. Then remove the table name from the expression:
=Sum(Abs(ADeconOverall = "Excellent" OR BDeconOverall = "Excellent"))/Count(*)

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top