Counting records :-(

A

Ady

Hi There

I have a report that is linked to a query. In this query I have a field name
orderID. This is the order number. If one order has 5 lines (in other words
the customer has ordered 5 items) the orderID is listed down the column 5
times. For example:

QUERY EXAMPLE:
orderID Part Number
W1256 Part A
W1256 Part B
W1256 PartC
W1256 Part D
W1256 PartE

This is fine and works well....However, in my report I am tring to count the
total number of individual orders. I am placing my formula in the "Report
Footer"

=Count([orderID])

The problem is it is counting all the lines! For instance the example above
should show 1, however with my formula it is showing 5. I only need it to
count the individual numbers!

Any help offered will be most appreciated!

Kind Regards

Ady
 
D

Duane Hookom

You need to add an OrderID group header section. Add a text box to the
header:
Name: txtCountOrders
Control Source: =1
Running Sum: Over All
Then add text box to your report footer:
Control Source: =txtCountOrders
 
A

Ady

Hi There

Many thanks for the quick reply, however am still not quite understanding. I
had already created a group header (by dragging orderID into it) for the
order number. I then (as I understand it) am trying to count the text box's
in the group header.

Should my formula in the report footer be =Count([txtCountOrders]) or in my
example =Count([txtorderID])

Sorry for being a bit slow here, am not an Access expert! Many thanks for
your help! If you could explain it for a newbie it would be really
appreciated!

Many thanks again!

Ady


Duane Hookom said:
You need to add an OrderID group header section. Add a text box to the
header:
Name: txtCountOrders
Control Source: =1
Running Sum: Over All
Then add text box to your report footer:
Control Source: =txtCountOrders

--
Duane Hookom
MS Access MVP


Ady said:
Hi There

I have a report that is linked to a query. In this query I have a field name
orderID. This is the order number. If one order has 5 lines (in other words
the customer has ordered 5 items) the orderID is listed down the column 5
times. For example:

QUERY EXAMPLE:
orderID Part Number
W1256 Part A
W1256 Part B
W1256 PartC
W1256 Part D
W1256 PartE

This is fine and works well....However, in my report I am tring to count the
total number of individual orders. I am placing my formula in the "Report
Footer"

=Count([orderID])

The problem is it is counting all the lines! For instance the example above
should show 1, however with my formula it is showing 5. I only need it to
count the individual numbers!

Any help offered will be most appreciated!

Kind Regards

Ady
 
D

Duane Hookom

The control source of the text box in the report footer is exactly what I
suggested.
=txtCountOrders
You don't use "Count()".

--
Duane Hookom
MS Access MVP


Ady said:
Hi There

Many thanks for the quick reply, however am still not quite understanding. I
had already created a group header (by dragging orderID into it) for the
order number. I then (as I understand it) am trying to count the text box's
in the group header.

Should my formula in the report footer be =Count([txtCountOrders]) or in my
example =Count([txtorderID])

Sorry for being a bit slow here, am not an Access expert! Many thanks for
your help! If you could explain it for a newbie it would be really
appreciated!

Many thanks again!

Ady


Duane Hookom said:
You need to add an OrderID group header section. Add a text box to the
header:
Name: txtCountOrders
Control Source: =1
Running Sum: Over All
Then add text box to your report footer:
Control Source: =txtCountOrders

--
Duane Hookom
MS Access MVP


field
name
column
5
times. For example:

QUERY EXAMPLE:
orderID Part Number
W1256 Part A
W1256 Part B
W1256 PartC
W1256 Part D
W1256 PartE

This is fine and works well....However, in my report I am tring to
count
the
total number of individual orders. I am placing my formula in the "Report
Footer"

=Count([orderID])

The problem is it is counting all the lines! For instance the example above
should show 1, however with my formula it is showing 5. I only need it to
count the individual numbers!

Any help offered will be most appreciated!

Kind Regards

Ady
 
A

Ady

YES!

Now it works!

Many Thanks!

Ady

Duane Hookom said:
The control source of the text box in the report footer is exactly what I
suggested.
=txtCountOrders
You don't use "Count()".

--
Duane Hookom
MS Access MVP


Ady said:
Hi There

Many thanks for the quick reply, however am still not quite
understanding.
I
had already created a group header (by dragging orderID into it) for the
order number. I then (as I understand it) am trying to count the text box's
in the group header.

Should my formula in the report footer be =Count([txtCountOrders]) or in my
example =Count([txtorderID])

Sorry for being a bit slow here, am not an Access expert! Many thanks for
your help! If you could explain it for a newbie it would be really
appreciated!

Many thanks again!

Ady


Duane Hookom said:
You need to add an OrderID group header section. Add a text box to the
header:
Name: txtCountOrders
Control Source: =1
Running Sum: Over All
Then add text box to your report footer:
Control Source: =txtCountOrders

--
Duane Hookom
MS Access MVP


Hi There

I have a report that is linked to a query. In this query I have a field
name
orderID. This is the order number. If one order has 5 lines (in other
words
the customer has ordered 5 items) the orderID is listed down the
column
5
times. For example:

QUERY EXAMPLE:
orderID Part Number
W1256 Part A
W1256 Part B
W1256 PartC
W1256 Part D
W1256 PartE

This is fine and works well....However, in my report I am tring to count
the
total number of individual orders. I am placing my formula in the "Report
Footer"

=Count([orderID])

The problem is it is counting all the lines! For instance the example
above
should show 1, however with my formula it is showing 5. I only need
it
to
count the individual numbers!

Any help offered will be most appreciated!

Kind Regards

Ady
 

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