If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Query Sums by date and client restriction
Hello, I am trying to run a total [page]*[quantity] count:
Totals: (Sum(([tbl_GovTrack]![Quantity]*[tbl_GovTrack]![Pages]))) This returns the [Page]*[Quantity] to Totals My [datestamp] has the following: Between [EnterStartDate] And [EnterStopDate] I need the total for client A: A 12*1==12 A 12*12==144 A 11*2==22 I get the totals for each line item but I can't get the total for all "A" clients specified by date Range. I need "A"==178 one line answer. Thank you in advance |
#2
|
|||
|
|||
Query Sums by date and client restriction
SELECT Sum([Quantity]*[Pages]) as Totals
FROM tblYourTable WHERE Client = "A" and DateStamp Between [EnterStartDate] And [EnterStopDate]; -- Duane Hookom MS Access MVP "VADIMBAR" wrote in message ... Hello, I am trying to run a total [page]*[quantity] count: Totals: (Sum(([tbl_GovTrack]![Quantity]*[tbl_GovTrack]![Pages]))) This returns the [Page]*[Quantity] to Totals My [datestamp] has the following: Between [EnterStartDate] And [EnterStopDate] I need the total for client A: A 12*1==12 A 12*12==144 A 11*2==22 I get the totals for each line item but I can't get the total for all "A" clients specified by date Range. I need "A"==178 one line answer. Thank you in advance |
#3
|
|||
|
|||
Query Sums by date and client restriction
Excellent thank you. If my Client is a variable that needs user intervention? do I use:
SELECT Sum([Quantity]*[Pages]) as Totals FROM tblYourTable WHERE Client = ([Enter client Name] &"*") and DateStamp Between [EnterStartDate] And [EnterStopDate]; "Duane Hookom" wrote: SELECT Sum([Quantity]*[Pages]) as Totals FROM tblYourTable WHERE Client = "A" and DateStamp Between [EnterStartDate] And [EnterStopDate]; -- Duane Hookom MS Access MVP "VADIMBAR" wrote in message ... Hello, I am trying to run a total [page]*[quantity] count: Totals: (Sum(([tbl_GovTrack]![Quantity]*[tbl_GovTrack]![Pages]))) This returns the [Page]*[Quantity] to Totals My [datestamp] has the following: Between [EnterStartDate] And [EnterStopDate] I need the total for client A: A 12*1==12 A 12*12==144 A 11*2==22 I get the totals for each line item but I can't get the total for all "A" clients specified by date Range. I need "A"==178 one line answer. Thank you in advance |
#4
|
|||
|
|||
Query Sums by date and client restriction
I don't ever use parameter queries however yours should work. A much better
method is to use controls on forms in place of parameters. -- Duane Hookom MS Access MVP "Vadimbar" wrote in message ... Excellent thank you. If my Client is a variable that needs user intervention? do I use: SELECT Sum([Quantity]*[Pages]) as Totals FROM tblYourTable WHERE Client = ([Enter client Name] &"*") and DateStamp Between [EnterStartDate] And [EnterStopDate]; "Duane Hookom" wrote: SELECT Sum([Quantity]*[Pages]) as Totals FROM tblYourTable WHERE Client = "A" and DateStamp Between [EnterStartDate] And [EnterStopDate]; -- Duane Hookom MS Access MVP "VADIMBAR" wrote in message ... Hello, I am trying to run a total [page]*[quantity] count: Totals: (Sum(([tbl_GovTrack]![Quantity]*[tbl_GovTrack]![Pages]))) This returns the [Page]*[Quantity] to Totals My [datestamp] has the following: Between [EnterStartDate] And [EnterStopDate] I need the total for client A: A 12*1==12 A 12*12==144 A 11*2==22 I get the totals for each line item but I can't get the total for all "A" clients specified by date Range. I need "A"==178 one line answer. Thank you in advance |
#5
|
|||
|
|||
Query Sums by date and client restriction
Thank you Duane. I'll look into it.
Vadimbar "Duane Hookom" wrote: I don't ever use parameter queries however yours should work. A much better method is to use controls on forms in place of parameters. -- Duane Hookom MS Access MVP "Vadimbar" wrote in message ... Excellent thank you. If my Client is a variable that needs user intervention? do I use: SELECT Sum([Quantity]*[Pages]) as Totals FROM tblYourTable WHERE Client = ([Enter client Name] &"*") and DateStamp Between [EnterStartDate] And [EnterStopDate]; "Duane Hookom" wrote: SELECT Sum([Quantity]*[Pages]) as Totals FROM tblYourTable WHERE Client = "A" and DateStamp Between [EnterStartDate] And [EnterStopDate]; -- Duane Hookom MS Access MVP "VADIMBAR" wrote in message ... Hello, I am trying to run a total [page]*[quantity] count: Totals: (Sum(([tbl_GovTrack]![Quantity]*[tbl_GovTrack]![Pages]))) This returns the [Page]*[Quantity] to Totals My [datestamp] has the following: Between [EnterStartDate] And [EnterStopDate] I need the total for client A: A 12*1==12 A 12*12==144 A 11*2==22 I get the totals for each line item but I can't get the total for all "A" clients specified by date Range. I need "A"==178 one line answer. Thank you in advance |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Update another table with a Max record query | Ngan | Running & Setting Up Queries | 2 | June 22nd, 2004 05:01 PM |
Report with multiple date parameters | Sabra Briere | General Discussion | 7 | June 20th, 2004 09:55 PM |
Generating an ID based on current date | Paul Fenton | General Discussion | 5 | June 20th, 2004 01:34 AM |
Macro possible? | Nimit Mehta | Worksheet Functions | 5 | June 7th, 2004 10:39 PM |
Excel indicator for when a future date is reached! | glenrayel | Worksheet Functions | 0 | February 11th, 2004 11:55 AM |