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!

Can't Add Totals to Report

Status
Not open for further replies.

Chinyere

Programmer
Mar 9, 2001
79
US
Hello All [afro2],

I can't seem to add totals to my report. I have based my report on a query (SQL view below):

Code:
SELECT table.Lname & ", " & table.Fname AS FULLNAME, table.Abbrev, table.First_Participant, table.Attn_02
FROM table
WHERE (((table.First_Time)=Yes) AND ((table.Attn_02)=Yes)) AND =Abs(Sum([table].[First_Participant]=True And [table].[Attn_02]=True))
ORDER BY table.Lname & ", " & table.Fname;

Table is the name of my table for tis purpose. The code is almost there but I know that something is wrong because I keep getting the dreaded #Error message when I try to view this report. Can someone help? I need HELP ASAP!

Chinyere



 
Just off the top of my head and initial inspection, it looks like your ORDER BY has not required quotes. It reads:

ORDER BY table.LName & ", " & table.FName;

The comma does not need to be in quotes if the WHERE statement isn't in quotes. So, try:

ORDER BY table.LName,table.FName;

Further inspection shows the same with the SELECT statement. A typical SQL would be like:

SELECT
.NameID,
.FName,
.LName,
.Address,
.City,
.State
FROM

WHERE (((table.First_Time)=Yes) AND ((table.Attn_02)=Yes)) AND =Abs(Sum(
.[First_Participant]=True And
.[Attn_02]=True))
ORDER BY
.LName,
.FName;

Try this.
Roy McCafferty
aka BanditWk
Las Vegas, NV
roy@cccamerica.org
RLMBandit@aol.com (private)

"I do this because I know I can and I'm bored at work - no need to send flowers, wine, dinner, or coffee... Just send me a smile to show me that I've helped." ~ Roy McCafferty, seen on a corner in Las Vegas with a sign that said, 'Will work
 
Thank you BanditWk!

I guess that my real problem is that I cannot add totals in the footer of the report. I would like to place it in the footer instead of the body so that it does not repeat. Do you know how to put a simple total expression:

Code:
=Abs(Sum([table].[First_Participant]=True And [table].[Attn_02]=True))

in the footer without getting an error message. Or alternatively, placing it in the body without having it repeat with every record?

Thanks!

Chinyere [bigsmile]
 
Chinyere,

Just checking...You are placing your expression:
Code:
=Abs(Sum([table].[First_Participant]=True And [table].[Attn_02]=True))
in the report footer right?? You can't place calculated totals in the page footer without some extra coding....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top