A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query Sums by date and client restriction



 
 
Thread Tools Display Modes
  #1  
Old July 8th, 2004, 11:19 PM
VADIMBAR
external usenet poster
 
Posts: n/a
Default 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  
Old July 9th, 2004, 02:01 AM
Duane Hookom
external usenet poster
 
Posts: n/a
Default 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  
Old July 9th, 2004, 04:13 AM
Vadimbar
external usenet poster
 
Posts: n/a
Default 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  
Old July 9th, 2004, 04:19 AM
Duane Hookom
external usenet poster
 
Posts: n/a
Default 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  
Old July 9th, 2004, 03:04 PM
Vadimbar
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 11:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.