Show total (count) of text based entries

T

Timothy.Rybak

I have a query that has the following fields:

Date/Time PartCode
6/15/2006 5:00:00 am A
6/15/2006 5:01:00 am B
6/15/2006 5:02:00 am A
6/15/2006 5:03:00 am B
6/15/2006 5:04:00 am C


I need to have this outputted to a report that will show a summary as
follows:

(User enters a start and end date/time and the results are given
between the entries)

Part Code Number of Parts
A 2
B 2
C 1

Since the Part code is text, I can't figure out how to total this data
up.

Any help is appreciated.

TIm
 
T

Timothy.Rybak

Duane,

Thanks for the quick help. I am working in the Design View, and I
replaced PartCode in the field box with count([PartCode]).

However, I am just getting a single number that represents a count of
all of the results, as if they were all the same code (they're not, I
checked).

Is there something I am missing?

Tim




Duane said:
Use Count([PartCode]) to get your results in a totals query.
--
Duane Hookom
MS Access MVP

I have a query that has the following fields:

Date/Time PartCode
6/15/2006 5:00:00 am A
6/15/2006 5:01:00 am B
6/15/2006 5:02:00 am A
6/15/2006 5:03:00 am B
6/15/2006 5:04:00 am C


I need to have this outputted to a report that will show a summary as
follows:

(User enters a start and end date/time and the results are given
between the entries)

Part Code Number of Parts
A 2
B 2
C 1

Since the Part code is text, I can't figure out how to total this data
up.

Any help is appreciated.

TIm
 
D

Duane Hookom

Create a totals query like:
SELECT PartCode, Count(PartCode) as TheCount
FROM tblParts
WHERE DateField Between Forms!frmDates!txtStart and Forms!frmDates!txtEnd
GROUP BY PartCode;

Use this query as the record source of a report or subreport.

--
Duane Hookom
MS Access MVP

Duane,

Thanks for the quick help. I am working in the Design View, and I
replaced PartCode in the field box with count([PartCode]).

However, I am just getting a single number that represents a count of
all of the results, as if they were all the same code (they're not, I
checked).

Is there something I am missing?

Tim




Duane said:
Use Count([PartCode]) to get your results in a totals query.
--
Duane Hookom
MS Access MVP

I have a query that has the following fields:

Date/Time PartCode
6/15/2006 5:00:00 am A
6/15/2006 5:01:00 am B
6/15/2006 5:02:00 am A
6/15/2006 5:03:00 am B
6/15/2006 5:04:00 am C


I need to have this outputted to a report that will show a summary as
follows:

(User enters a start and end date/time and the results are given
between the entries)

Part Code Number of Parts
A 2
B 2
C 1

Since the Part code is text, I can't figure out how to total this data
up.

Any help is appreciated.

TIm
 
T

Timothy.Rybak

It worked! You rule Duane!

Tim

Duane said:
Create a totals query like:
SELECT PartCode, Count(PartCode) as TheCount
FROM tblParts
WHERE DateField Between Forms!frmDates!txtStart and Forms!frmDates!txtEnd
GROUP BY PartCode;

Use this query as the record source of a report or subreport.

--
Duane Hookom
MS Access MVP

Duane,

Thanks for the quick help. I am working in the Design View, and I
replaced PartCode in the field box with count([PartCode]).

However, I am just getting a single number that represents a count of
all of the results, as if they were all the same code (they're not, I
checked).

Is there something I am missing?

Tim




Duane said:
Use Count([PartCode]) to get your results in a totals query.
--
Duane Hookom
MS Access MVP

I have a query that has the following fields:

Date/Time PartCode
6/15/2006 5:00:00 am A
6/15/2006 5:01:00 am B
6/15/2006 5:02:00 am A
6/15/2006 5:03:00 am B
6/15/2006 5:04:00 am C


I need to have this outputted to a report that will show a summary as
follows:

(User enters a start and end date/time and the results are given
between the entries)

Part Code Number of Parts
A 2
B 2
C 1

Since the Part code is text, I can't figure out how to total this data
up.

Any help is appreciated.

TIm
 

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