Sales Report by month/quarter

D

DMWM

Hi,

This could be an interesting one!

I have a database that has tblCustomer, tblProducts, tblProducts_Quoted,
tblJob

tblProducts_Quoted holds all info for products as per the job (quantity,
price etc) and tblJob holds the date of the enquiry.

I'm trying to create a report that will show the quantity of items sold in a
particular month/and or quarter (i feel it'll be the same code just change
the way the date is entered)

I can get the query to group the products to show how many are sold but when
i add the date into the query, the joining of the tables is thrown off and no
data is displayed.

Anyone with any ideas? If you need more info or a better explanation please
let me know.

Many Thanks

DMWM
 
D

DMWM

SELECT tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, Sum(tblProducts_Quoted.Quantity) AS
SumOfQuantity, tblProducts_Quoted.Actual_Price, tblJob.Date_of_Enquiry
FROM (tblProducts INNER JOIN tblProducts_Quoted ON tblProducts.Product_ID =
tblProducts_Quoted.Product_ID) INNER JOIN tblJob ON
tblProducts_Quoted.Products_Quoted_ID = tblJob.Products_Quoted_ID
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price,
tblJob.Date_of_Enquiry
HAVING (((tblJob.Date_of_Enquiry) Between [Enter Start Date] And [Enter End
Date]));

Thankyou in advance
 
H

Hans Up

DMWM said:
SELECT tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, Sum(tblProducts_Quoted.Quantity) AS
SumOfQuantity, tblProducts_Quoted.Actual_Price, tblJob.Date_of_Enquiry
FROM (tblProducts INNER JOIN tblProducts_Quoted ON tblProducts.Product_ID =
tblProducts_Quoted.Product_ID) INNER JOIN tblJob ON
tblProducts_Quoted.Products_Quoted_ID = tblJob.Products_Quoted_ID
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price,
tblJob.Date_of_Enquiry
HAVING (((tblJob.Date_of_Enquiry) Between [Enter Start Date] And [Enter End
Date]));

Just a wild guess here, but is this closer to what you want?

SELECT tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, Sum(tblProducts_Quoted.Quantity) AS
SumOfQuantity, tblProducts_Quoted.Actual_Price
FROM (tblProducts INNER JOIN tblProducts_Quoted ON tblProducts.Product_ID =
tblProducts_Quoted.Product_ID) INNER JOIN tblJob ON
tblProducts_Quoted.Products_Quoted_ID = tblJob.Products_Quoted_ID
WHERE (((tblJob.Date_of_Enquiry) Between [Enter Start Date]
And [Enter End Date]))
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price;
 
D

DMWM

No sorry that didnt work. Just provided me with no data as before.

Thanks for trying though

Hans Up said:
DMWM said:
SELECT tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, Sum(tblProducts_Quoted.Quantity) AS
SumOfQuantity, tblProducts_Quoted.Actual_Price, tblJob.Date_of_Enquiry
FROM (tblProducts INNER JOIN tblProducts_Quoted ON tblProducts.Product_ID =
tblProducts_Quoted.Product_ID) INNER JOIN tblJob ON
tblProducts_Quoted.Products_Quoted_ID = tblJob.Products_Quoted_ID
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price,
tblJob.Date_of_Enquiry
HAVING (((tblJob.Date_of_Enquiry) Between [Enter Start Date] And [Enter End
Date]));

Just a wild guess here, but is this closer to what you want?

SELECT tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, Sum(tblProducts_Quoted.Quantity) AS
SumOfQuantity, tblProducts_Quoted.Actual_Price
FROM (tblProducts INNER JOIN tblProducts_Quoted ON tblProducts.Product_ID =
tblProducts_Quoted.Product_ID) INNER JOIN tblJob ON
tblProducts_Quoted.Products_Quoted_ID = tblJob.Products_Quoted_ID
WHERE (((tblJob.Date_of_Enquiry) Between [Enter Start Date]
And [Enter End Date]))
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price;
 
H

Hans Up

DMWM said:
No sorry that didnt work. Just provided me with no data as before.

Hmmm. I'm missing something. Without the GROUP BY, do you get the data
set you expect from this query?

SELECT
p.Product_ID,
p.Product_Name,
p.Product_Description,
p.Product_Size,
p.Product_Colour,
q.Quantity,
q.Actual_Price,
j.Date_of_Enquiry
FROM
(tblProducts AS p
INNER JOIN tblProducts_Quoted AS q
ON p.Product_ID = q.Product_ID)
INNER JOIN tblJob AS j
ON q.Products_Quoted_ID = j.Products_Quoted_ID
WHERE (((j.Date_of_Enquiry) Between [Enter Start Date]
And [Enter End Date]));
 
K

Klatuu

The Group By query may not be getting what you are wanting. I suggest you
take the grouping out of the query and use the sorting and grouping in the
report. Then, rather than using a parameter query, do the filtering in the
report. My favorite way to do that is to use the Where argument of the
OpenReport method to filter the dates.
--
Dave Hargis, Microsoft Access MVP


DMWM said:
SELECT tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, Sum(tblProducts_Quoted.Quantity) AS
SumOfQuantity, tblProducts_Quoted.Actual_Price, tblJob.Date_of_Enquiry
FROM (tblProducts INNER JOIN tblProducts_Quoted ON tblProducts.Product_ID =
tblProducts_Quoted.Product_ID) INNER JOIN tblJob ON
tblProducts_Quoted.Products_Quoted_ID = tblJob.Products_Quoted_ID
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price,
tblJob.Date_of_Enquiry
HAVING (((tblJob.Date_of_Enquiry) Between [Enter Start Date] And [Enter End
Date]));

Thankyou in advance

Klatuu said:
Post the SQL of your query so we can see what might be causing it.
 
J

John Spencer

Declare the parameter types and be sure Date_of_Enquiry is a dateTime field

Parameters [Enter Start Date] DateTime, [Enter End Date] DateTime;
SELECT tblProducts.Product_ID
, tblProducts.Product_Name
, tblProducts.Product_Description
, tblProducts.Product_Size
, tblProducts.Product_Colour
, Sum(tblProducts_Quoted.Quantity) AS SumOfQuantity
, tblProducts_Quoted.Actual_Price
FROM (tblProducts INNER JOIN tblProducts_Quoted ON tblProducts.Product_ID =
tblProducts_Quoted.Product_ID) INNER JOIN tblJob ON
tblProducts_Quoted.Products_Quoted_ID = tblJob.Products_Quoted_ID
WHERE tblJob.Date_of_Enquiry Between [Enter Start Date] And [Enter End Date]
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price;



John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Hans said:
DMWM said:
SELECT tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, Sum(tblProducts_Quoted.Quantity) AS
SumOfQuantity, tblProducts_Quoted.Actual_Price, tblJob.Date_of_Enquiry
FROM (tblProducts INNER JOIN tblProducts_Quoted ON
tblProducts.Product_ID = tblProducts_Quoted.Product_ID) INNER JOIN
tblJob ON tblProducts_Quoted.Products_Quoted_ID =
tblJob.Products_Quoted_ID
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price,
tblJob.Date_of_Enquiry
HAVING (((tblJob.Date_of_Enquiry) Between [Enter Start Date] And
[Enter End Date]));

Just a wild guess here, but is this closer to what you want?

SELECT tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, Sum(tblProducts_Quoted.Quantity) AS
SumOfQuantity, tblProducts_Quoted.Actual_Price
FROM (tblProducts INNER JOIN tblProducts_Quoted ON tblProducts.Product_ID =
tblProducts_Quoted.Product_ID) INNER JOIN tblJob ON
tblProducts_Quoted.Products_Quoted_ID = tblJob.Products_Quoted_ID
WHERE (((tblJob.Date_of_Enquiry) Between [Enter Start Date]
And [Enter End Date]))
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price;
 
D

DMWM

Hi Dave,

I'm not sure what you mean by group the report. I am using the wizard to do
it at the moment. Is that the best way?

Thanks

Klatuu said:
The Group By query may not be getting what you are wanting. I suggest you
take the grouping out of the query and use the sorting and grouping in the
report. Then, rather than using a parameter query, do the filtering in the
report. My favorite way to do that is to use the Where argument of the
OpenReport method to filter the dates.
--
Dave Hargis, Microsoft Access MVP


DMWM said:
SELECT tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, Sum(tblProducts_Quoted.Quantity) AS
SumOfQuantity, tblProducts_Quoted.Actual_Price, tblJob.Date_of_Enquiry
FROM (tblProducts INNER JOIN tblProducts_Quoted ON tblProducts.Product_ID =
tblProducts_Quoted.Product_ID) INNER JOIN tblJob ON
tblProducts_Quoted.Products_Quoted_ID = tblJob.Products_Quoted_ID
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price,
tblJob.Date_of_Enquiry
HAVING (((tblJob.Date_of_Enquiry) Between [Enter Start Date] And [Enter End
Date]));

Thankyou in advance

Klatuu said:
Post the SQL of your query so we can see what might be causing it.
--
Dave Hargis, Microsoft Access MVP


:

Hi,

This could be an interesting one!

I have a database that has tblCustomer, tblProducts, tblProducts_Quoted,
tblJob

tblProducts_Quoted holds all info for products as per the job (quantity,
price etc) and tblJob holds the date of the enquiry.

I'm trying to create a report that will show the quantity of items sold in a
particular month/and or quarter (i feel it'll be the same code just change
the way the date is entered)

I can get the query to group the products to show how many are sold but when
i add the date into the query, the joining of the tables is thrown off and no
data is displayed.

Anyone with any ideas? If you need more info or a better explanation please
let me know.

Many Thanks

DMWM
 
D

DMWM

In addition to this i have a seperate question along th same lines. I am
trying to produce a report which show how many orders have been made by each
category of customer.

In the customer form you can select via check box what type of customer they
are either school, coporate, private, or retail. I need the report to say how
many orders in a particular date range have been from each sector.

I hope someone can help

Thanks

DMWM said:
Hi Dave,

I'm not sure what you mean by group the report. I am using the wizard to do
it at the moment. Is that the best way?

Thanks

Klatuu said:
The Group By query may not be getting what you are wanting. I suggest you
take the grouping out of the query and use the sorting and grouping in the
report. Then, rather than using a parameter query, do the filtering in the
report. My favorite way to do that is to use the Where argument of the
OpenReport method to filter the dates.
--
Dave Hargis, Microsoft Access MVP


DMWM said:
SELECT tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, Sum(tblProducts_Quoted.Quantity) AS
SumOfQuantity, tblProducts_Quoted.Actual_Price, tblJob.Date_of_Enquiry
FROM (tblProducts INNER JOIN tblProducts_Quoted ON tblProducts.Product_ID =
tblProducts_Quoted.Product_ID) INNER JOIN tblJob ON
tblProducts_Quoted.Products_Quoted_ID = tblJob.Products_Quoted_ID
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price,
tblJob.Date_of_Enquiry
HAVING (((tblJob.Date_of_Enquiry) Between [Enter Start Date] And [Enter End
Date]));

Thankyou in advance

:

Post the SQL of your query so we can see what might be causing it.
--
Dave Hargis, Microsoft Access MVP


:

Hi,

This could be an interesting one!

I have a database that has tblCustomer, tblProducts, tblProducts_Quoted,
tblJob

tblProducts_Quoted holds all info for products as per the job (quantity,
price etc) and tblJob holds the date of the enquiry.

I'm trying to create a report that will show the quantity of items sold in a
particular month/and or quarter (i feel it'll be the same code just change
the way the date is entered)

I can get the query to group the products to show how many are sold but when
i add the date into the query, the joining of the tables is thrown off and no
data is displayed.

Anyone with any ideas? If you need more info or a better explanation please
let me know.

Many Thanks

DMWM
 
B

BruceM

With the report open in design view, click View >> Sorting and Grouping. If
you want to group by CustType (or whatever the field is called), select the
field, then in the bottom part of the dialog select Yes for Group Header and
Group Footer. In the Group Header put a text box bound to CustType. This
will be the section label. In the Detail section put an unbound text box.
Set its Control Source to =1, and its Running Sum property to Over Group. I
will call it txtCount; give it whatever name you like. Make it invisible,
if you like, or keep it visible to number the records.

In the group footer, add an unbound text box. Set its Control Source to
=[txtCount].

I will leave you to experiment with Sorting and Grouping. If you want to
add a date range criteria you can do that with Parameter prompts in the
query. There are a number of ways to add the date range to the header, if
you would like to do that. One way is to use an unbound form to specify the
date range. If the form is frmDateRange with text boxes txtFrom and txtTo,
the date criteria in the query could be:
BETWEEN Forms!frmDateRange!txtFrom AND Forms!frmDateRange!txtTo
Unbound text boxes in the report header could use the same text boxes as
their control source:
=Forms!frmDateRange!txtFrom
=Forms!frmDateRange!txtTo

You need to leave the form open if you do this. You can hide the form when
you open the report, then close it in the form's Close event.

I hope you are getting the general idea of how flexibly you can arrange data
on reports. Post again if you have specific questions.

DMWM said:
In addition to this i have a seperate question along th same lines. I am
trying to produce a report which show how many orders have been made by
each
category of customer.

In the customer form you can select via check box what type of customer
they
are either school, coporate, private, or retail. I need the report to say
how
many orders in a particular date range have been from each sector.

I hope someone can help

Thanks

DMWM said:
Hi Dave,

I'm not sure what you mean by group the report. I am using the wizard to
do
it at the moment. Is that the best way?

Thanks

Klatuu said:
The Group By query may not be getting what you are wanting. I suggest
you
take the grouping out of the query and use the sorting and grouping in
the
report. Then, rather than using a parameter query, do the filtering in
the
report. My favorite way to do that is to use the Where argument of the
OpenReport method to filter the dates.
--
Dave Hargis, Microsoft Access MVP


:

SELECT tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, Sum(tblProducts_Quoted.Quantity) AS
SumOfQuantity, tblProducts_Quoted.Actual_Price,
tblJob.Date_of_Enquiry
FROM (tblProducts INNER JOIN tblProducts_Quoted ON
tblProducts.Product_ID =
tblProducts_Quoted.Product_ID) INNER JOIN tblJob ON
tblProducts_Quoted.Products_Quoted_ID = tblJob.Products_Quoted_ID
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price,
tblJob.Date_of_Enquiry
HAVING (((tblJob.Date_of_Enquiry) Between [Enter Start Date] And
[Enter End
Date]));

Thankyou in advance

:

Post the SQL of your query so we can see what might be causing it.
--
Dave Hargis, Microsoft Access MVP


:

Hi,

This could be an interesting one!

I have a database that has tblCustomer, tblProducts,
tblProducts_Quoted,
tblJob

tblProducts_Quoted holds all info for products as per the job
(quantity,
price etc) and tblJob holds the date of the enquiry.

I'm trying to create a report that will show the quantity of
items sold in a
particular month/and or quarter (i feel it'll be the same code
just change
the way the date is entered)

I can get the query to group the products to show how many are
sold but when
i add the date into the query, the joining of the tables is
thrown off and no
data is displayed.

Anyone with any ideas? If you need more info or a better
explanation please
let me know.

Many Thanks

DMWM
 
D

DMWM

Bruce,

Your are a legend. What a fantastic help you've been. You gave me just
enough help for me to work the rest out myself and now ive learnt properly.
Cannot thank you enough.

Cheers

DMWM

BruceM said:
With the report open in design view, click View >> Sorting and Grouping. If
you want to group by CustType (or whatever the field is called), select the
field, then in the bottom part of the dialog select Yes for Group Header and
Group Footer. In the Group Header put a text box bound to CustType. This
will be the section label. In the Detail section put an unbound text box.
Set its Control Source to =1, and its Running Sum property to Over Group. I
will call it txtCount; give it whatever name you like. Make it invisible,
if you like, or keep it visible to number the records.

In the group footer, add an unbound text box. Set its Control Source to
=[txtCount].

I will leave you to experiment with Sorting and Grouping. If you want to
add a date range criteria you can do that with Parameter prompts in the
query. There are a number of ways to add the date range to the header, if
you would like to do that. One way is to use an unbound form to specify the
date range. If the form is frmDateRange with text boxes txtFrom and txtTo,
the date criteria in the query could be:
BETWEEN Forms!frmDateRange!txtFrom AND Forms!frmDateRange!txtTo
Unbound text boxes in the report header could use the same text boxes as
their control source:
=Forms!frmDateRange!txtFrom
=Forms!frmDateRange!txtTo

You need to leave the form open if you do this. You can hide the form when
you open the report, then close it in the form's Close event.

I hope you are getting the general idea of how flexibly you can arrange data
on reports. Post again if you have specific questions.

DMWM said:
In addition to this i have a seperate question along th same lines. I am
trying to produce a report which show how many orders have been made by
each
category of customer.

In the customer form you can select via check box what type of customer
they
are either school, coporate, private, or retail. I need the report to say
how
many orders in a particular date range have been from each sector.

I hope someone can help

Thanks

DMWM said:
Hi Dave,

I'm not sure what you mean by group the report. I am using the wizard to
do
it at the moment. Is that the best way?

Thanks

:

The Group By query may not be getting what you are wanting. I suggest
you
take the grouping out of the query and use the sorting and grouping in
the
report. Then, rather than using a parameter query, do the filtering in
the
report. My favorite way to do that is to use the Where argument of the
OpenReport method to filter the dates.
--
Dave Hargis, Microsoft Access MVP


:

SELECT tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, Sum(tblProducts_Quoted.Quantity) AS
SumOfQuantity, tblProducts_Quoted.Actual_Price,
tblJob.Date_of_Enquiry
FROM (tblProducts INNER JOIN tblProducts_Quoted ON
tblProducts.Product_ID =
tblProducts_Quoted.Product_ID) INNER JOIN tblJob ON
tblProducts_Quoted.Products_Quoted_ID = tblJob.Products_Quoted_ID
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price,
tblJob.Date_of_Enquiry
HAVING (((tblJob.Date_of_Enquiry) Between [Enter Start Date] And
[Enter End
Date]));

Thankyou in advance

:

Post the SQL of your query so we can see what might be causing it.
--
Dave Hargis, Microsoft Access MVP


:

Hi,

This could be an interesting one!

I have a database that has tblCustomer, tblProducts,
tblProducts_Quoted,
tblJob

tblProducts_Quoted holds all info for products as per the job
(quantity,
price etc) and tblJob holds the date of the enquiry.

I'm trying to create a report that will show the quantity of
items sold in a
particular month/and or quarter (i feel it'll be the same code
just change
the way the date is entered)

I can get the query to group the products to show how many are
sold but when
i add the date into the query, the joining of the tables is
thrown off and no
data is displayed.

Anyone with any ideas? If you need more info or a better
explanation please
let me know.

Many Thanks

DMWM
 
B

BruceM

Thank you for your kind words. I am truly glad to be of help. A lot of
what I pass along is stuff I learned here and in links I found here.

DMWM said:
Bruce,

Your are a legend. What a fantastic help you've been. You gave me just
enough help for me to work the rest out myself and now ive learnt
properly.
Cannot thank you enough.

Cheers

DMWM

BruceM said:
With the report open in design view, click View >> Sorting and Grouping.
If
you want to group by CustType (or whatever the field is called), select
the
field, then in the bottom part of the dialog select Yes for Group Header
and
Group Footer. In the Group Header put a text box bound to CustType.
This
will be the section label. In the Detail section put an unbound text
box.
Set its Control Source to =1, and its Running Sum property to Over Group.
I
will call it txtCount; give it whatever name you like. Make it
invisible,
if you like, or keep it visible to number the records.

In the group footer, add an unbound text box. Set its Control Source to
=[txtCount].

I will leave you to experiment with Sorting and Grouping. If you want to
add a date range criteria you can do that with Parameter prompts in the
query. There are a number of ways to add the date range to the header,
if
you would like to do that. One way is to use an unbound form to specify
the
date range. If the form is frmDateRange with text boxes txtFrom and
txtTo,
the date criteria in the query could be:
BETWEEN Forms!frmDateRange!txtFrom AND Forms!frmDateRange!txtTo
Unbound text boxes in the report header could use the same text boxes as
their control source:
=Forms!frmDateRange!txtFrom
=Forms!frmDateRange!txtTo

You need to leave the form open if you do this. You can hide the form
when
you open the report, then close it in the form's Close event.

I hope you are getting the general idea of how flexibly you can arrange
data
on reports. Post again if you have specific questions.

DMWM said:
In addition to this i have a seperate question along th same lines. I
am
trying to produce a report which show how many orders have been made by
each
category of customer.

In the customer form you can select via check box what type of customer
they
are either school, coporate, private, or retail. I need the report to
say
how
many orders in a particular date range have been from each sector.

I hope someone can help

Thanks

:

Hi Dave,

I'm not sure what you mean by group the report. I am using the wizard
to
do
it at the moment. Is that the best way?

Thanks

:

The Group By query may not be getting what you are wanting. I
suggest
you
take the grouping out of the query and use the sorting and grouping
in
the
report. Then, rather than using a parameter query, do the filtering
in
the
report. My favorite way to do that is to use the Where argument of
the
OpenReport method to filter the dates.
--
Dave Hargis, Microsoft Access MVP


:

SELECT tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, Sum(tblProducts_Quoted.Quantity) AS
SumOfQuantity, tblProducts_Quoted.Actual_Price,
tblJob.Date_of_Enquiry
FROM (tblProducts INNER JOIN tblProducts_Quoted ON
tblProducts.Product_ID =
tblProducts_Quoted.Product_ID) INNER JOIN tblJob ON
tblProducts_Quoted.Products_Quoted_ID = tblJob.Products_Quoted_ID
GROUP BY tblProducts.Product_ID, tblProducts.Product_Name,
tblProducts.Product_Description, tblProducts.Product_Size,
tblProducts.Product_Colour, tblProducts_Quoted.Actual_Price,
tblJob.Date_of_Enquiry
HAVING (((tblJob.Date_of_Enquiry) Between [Enter Start Date] And
[Enter End
Date]));

Thankyou in advance

:

Post the SQL of your query so we can see what might be causing
it.
--
Dave Hargis, Microsoft Access MVP


:

Hi,

This could be an interesting one!

I have a database that has tblCustomer, tblProducts,
tblProducts_Quoted,
tblJob

tblProducts_Quoted holds all info for products as per the job
(quantity,
price etc) and tblJob holds the date of the enquiry.

I'm trying to create a report that will show the quantity of
items sold in a
particular month/and or quarter (i feel it'll be the same code
just change
the way the date is entered)

I can get the query to group the products to show how many are
sold but when
i add the date into the query, the joining of the tables is
thrown off and no
data is displayed.

Anyone with any ideas? If you need more info or a better
explanation please
let me know.

Many Thanks

DMWM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top