Duplicate fields count as one.

C

Carl_and_Earl

Hello,
I have a form with multiple textboxes. The text are linked to a table with
values. In this table I have fields with duplicate values. At the bottom of
the report I have a total. I want to know if it's possible somehow to count
the duplicate fields as one.

Thank you very much.
 
K

KARL DEWEY

In this table I have fields with duplicate values.
Are the values duplicated across the row (In a Record) or down the row (In a
Field)?

Sam Sam Sam Bill
Or
Sam Bill
Sam Joe
Sam Ned
 
C

Carl_and_Earl

Thanks for your respose Karl,

The values are in a column (in a table). I input the values using a form.
So is like:

Sam Bill
Sam Joe
Sam Ned

I so need this ti finish the project. I tryed with Count(*), DCount, with
Sum... but all I have is errors. I don't know how to manage them correctly.
 
K

KARL DEWEY

I still do not understand. What is duplicated?
Post sample data that shows what you are talking about.
Show duplicates and then the count you wish to display.
 
J

Julia82

In fact is really simple to understand:
I have:

ID name
1 sam
2 sam
3 sam
4 bill
5 joe
6 ned
7 [4] <- total

The "sam, sam, sam" fields must be counted as one.
I know for sure it can be done. but how?

Thanks!
 
K

KARL DEWEY

The "sam, sam, sam" fields must be counted as one.
These are 'Records', not fields. Your fields are ID and name. NOTE- You
should not use Name as field title as it is a reserved word and may cause
problems.

This could be done in a single query if you knew subqueries which I do not,
so will need two.
qryNameList --
SELECT Name
FROM YourTable
GROUP BY Name;

SELECT Count([Name]) AS CountOfName
FROM qryNameList;

Julia82 said:
In fact is really simple to understand:
I have:

ID name
1 sam
2 sam
3 sam
4 bill
5 joe
6 ned
7 [4] <- total

The "sam, sam, sam" fields must be counted as one.
I know for sure it can be done. but how?

Thanks!


KARL DEWEY said:
I still do not understand. What is duplicated?
Post sample data that shows what you are talking about.
Show duplicates and then the count you wish to display.
 
J

Julia82

I knew it was simple.
I figured out Karl, finally.
(Query1)
All I had to do was to set the property of the query - "unique values = yes".
(Query2)
Then I did another query where I did the following:
SELECT Count("*") AS HowMany
FROM Query1;

Thanks for you help, much aprciated.


KARL DEWEY said:
These are 'Records', not fields. Your fields are ID and name. NOTE- You
should not use Name as field title as it is a reserved word and may cause
problems.

This could be done in a single query if you knew subqueries which I do not,
so will need two.
qryNameList --
SELECT Name
FROM YourTable
GROUP BY Name;

SELECT Count([Name]) AS CountOfName
FROM qryNameList;

Julia82 said:
In fact is really simple to understand:
I have:

ID name
1 sam
2 sam
3 sam
4 bill
5 joe
6 ned
7 [4] <- total

The "sam, sam, sam" fields must be counted as one.
I know for sure it can be done. but how?

Thanks!


KARL DEWEY said:
I still do not understand. What is duplicated?
Post sample data that shows what you are talking about.
Show duplicates and then the count you wish to display.

:

Thanks for your respose Karl,

The values are in a column (in a table). I input the values using a form.
So is like:

Sam Bill
Sam Joe
Sam Ned

I so need this ti finish the project. I tryed with Count(*), DCount, with
Sum... but all I have is errors. I don't know how to manage them correctly.

:

In this table I have fields with duplicate values.
Are the values duplicated across the row (In a Record) or down the row (In a
Field)?

Sam Sam Sam Bill
Or
Sam Bill
Sam Joe
Sam Ned

:

Hello,
I have a form with multiple textboxes. The text are linked to a table with
values. In this table I have fields with duplicate values. At the bottom of
the report I have a total. I want to know if it's possible somehow to count
the duplicate fields as one.

Thank you very much.
 
E

Evelyn Williams

I am having the same problem and have another week to accomplish the task.
My fields are as follows:
Source: Vendor
Grouping is by Source and Date.
In the Group header I have the total candidates, reqs submitted, #
interviewed, and number hired.
The detail has date, last, first, job title, req #, manager, int'd, hired,
hire date and days to fill.

In the Grouping everything works but Reqs Submitted column.. I keep getting
a count for all reqs and not the number of reqs submitted...example

Date Last First Job Title Req # Int'd Hired Hire
Date Days/Fill
3/3/09 Doe James Temp 00-093 Y Y 3/16/09
3
3/4/09 Smith John Internal 00-093 Y Y
3/15/09 4
3/5/09 Green Betty Acct Temp 09-043

The number of Reqs Submitted on the report is 3 not 2. whereby 00-093 is
counting twice and not skipping the second req which is a duplicate. Thanks
so much for your assistance.


KARL DEWEY said:
These are 'Records', not fields. Your fields are ID and name. NOTE- You
should not use Name as field title as it is a reserved word and may cause
problems.

This could be done in a single query if you knew subqueries which I do not,
so will need two.
qryNameList --
SELECT Name
FROM YourTable
GROUP BY Name;

SELECT Count([Name]) AS CountOfName
FROM qryNameList;

Julia82 said:
In fact is really simple to understand:
I have:

ID name
1 sam
2 sam
3 sam
4 bill
5 joe
6 ned
7 [4] <- total

The "sam, sam, sam" fields must be counted as one.
I know for sure it can be done. but how?

Thanks!


KARL DEWEY said:
I still do not understand. What is duplicated?
Post sample data that shows what you are talking about.
Show duplicates and then the count you wish to display.

:

Thanks for your respose Karl,

The values are in a column (in a table). I input the values using a form.
So is like:

Sam Bill
Sam Joe
Sam Ned

I so need this ti finish the project. I tryed with Count(*), DCount, with
Sum... but all I have is errors. I don't know how to manage them correctly.

:

In this table I have fields with duplicate values.
Are the values duplicated across the row (In a Record) or down the row (In a
Field)?

Sam Sam Sam Bill
Or
Sam Bill
Sam Joe
Sam Ned

:

Hello,
I have a form with multiple textboxes. The text are linked to a table with
values. In this table I have fields with duplicate values. At the bottom of
the report I have a total. I want to know if it's possible somehow to count
the duplicate fields as one.

Thank you very much.
 

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