Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 8th, 2005, 11:51 AM
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Urgent help about sending customized summary

Hi, could anyone teach me how to do this? I need some urgent help here! Experts please help! Thanks in advance!

Here is the result of a query I have:

Person Email Product Amount Category
A A@hotmail.com Apple 10 Fruit
A A@hotmail.com Orange 20 Fruit
A A@hotmail.com Pen 30 Office
B B@hotmail.com Apple 15 Fruit
B B@hotmail.com Orange 25 Fruit
B B@hotmail.com Pen 35 Office
C C@hotmail.com Apple 18 Fruit
C C@hotmail.com Orange 28 Fruit
C C@hotmail.com Pen 38 Office

What I need to do is the develop a report or other format, in a format like:

Person: A

Category
Fruit Amount Office Amount
Apple 10 Pen 30
Orange 20
Total 30 Total 30



Do this for A,B,and C and send the individual report in via email to them. To me it looks like a mail merge, but I don't know how to manipulate the data and put it into the layout. Also, how to get total for each category in the report? My real data has a lot of data, about 100 person, and about 60 product that falls into two categories. Is there anyway easy and fast way to do this? Please help! Thank you very much!

--------------------------------------------------------------------------------


  #2 (permalink)  
Old December 8th, 2005, 02:37 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Connersville, Indiana, USA.
Posts: 126
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Elain,
Here is how I have done this type of thing...(if there is an easier way, someone please share.)

For what you have provided you will need to do this for each person:
Create a query for the table and add all the fields.
Add a query field "FruitTotal: IIf (Category = Fruit, Sum(YourTableNameHere!Amount), "0")"

Add a query field "OfficeTotal:IIf (Category = Office, Sum(YourTableNameHere!Amount), "0")" (my note: if you will always only have one "office" for each person, you will not need this field in the query.

Then when you apply this to a form you can either have a "WhereCondition" on the open event so you can specify a person, or create a query & report like this for each person with the criteria set in the query.

Hope I understood what you are trying and was a help.

Regards,
Laura

The only thing standing between you and your goal is doubt. Quit doubting yourself and you'll be able to accomplish anything!


Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent help - Customized Windows login Screen Rehanrana Visual C++ 1 December 27th, 2007 03:48 AM
Urgent help - Customized Windows login Rehanrana C++ Programming 0 December 26th, 2007 08:15 AM
URGENT Error in sending mail qazi_nomi Classic ASP Basics 12 June 25th, 2004 07:42 PM
Urgent Error in sending mail qazi_nomi Classic ASP Components 1 June 11th, 2004 02:49 AM
URGENT!!! Sending file to server in browser kengyiam Beginning PHP 4 September 19th, 2003 02:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.