dslreports logo
 
    All Forums Hot Topics Gallery
spc
uniqs
8

natedj
Elected
Premium Member
join:2001-06-06
Irmo, SC

natedj

Premium Member

Re: [Access] I need help creating a "Grand Total" colu

Okay I tried the NZ function and got MS Access to calculate the blank fields as well, but the resulting format is not the same.
Instead to showing $1234.00 it would show the total as 1234
Any ideas on how to fix this one?
circade
join:2002-08-23
Minneapolis, MN

circade

Member

Formats in queries are not important. Create a Report of the query and then format the columns that way.

natedj
Elected
Premium Member
join:2001-06-06
Irmo, SC

natedj

Premium Member

I'm doing a Mail Merge from the query in to MS Word to print out some letters, not creating a report in Access. Can a Mail Merge work with a report too?
circade
join:2002-08-23
Minneapolis, MN

circade

Member

I don't the mail merge works with reports. You could create a Make Table query (Design->Make Table) that will store the query in a new table. Then use mail merge with the new table.

Copy the query you made into a new query and use the make table function. In SQL, it would simply add 'INTO newtable'. It would look something like:

SELECT DISTINCTROW Donations.FirstName, Donations.LastName, Sum(Nz(Donations.Food,0)) AS [Sum Of Food], Sum(Nz(Donations.Clothing,0)) AS [Sum Of Clothing], Sum(Nz(Donations.Shelter,0)) AS [Sum Of Shelter], [Sum Of Food]+[Sum Of Clothing]+[Sum Of Shelter] AS GrandTotal
INTO newtable
FROM Donations
WHERE (((Donations.Date) Between #1/1/2012# And #12/31/2012#))
GROUP BY Donations.FirstName, Donations.LastName;