Count a subset of records in a query

G

Guest

I am trying to place a footer on a form which counts a subset of the records
that the form displays based on one of its fields. The form uses a query to
display its data which is extracted from company mainframe and updated
nightly. The query and forms break down the data by day and workgroup. I want
to be able to display the number of records counted by one of its fields
which is a drop down list and restricts user to a limited number of
selections.
 
G

Guest

Not really sure if I understand what you are looking for but I "think" you
are looking to count the number of times a specific string appears in a field
in the query that the form is based on ???

Use this is the source of an unbound text box in the form footer
=DCount("*", "[QueryName]", "[FieldName] = 'Something'")

Let me know if this is what you need as there are other methods
 
G

Guest

I am getting an #Error message

I copied and pasted the text and changed the particulars to this:

=DCount("*","[qryStartsTbl]","[Contact Feedback] = 'Not Called'")



Wayne-I-M said:
Not really sure if I understand what you are looking for but I "think" you
are looking to count the number of times a specific string appears in a field
in the query that the form is based on ???

Use this is the source of an unbound text box in the form footer
=DCount("*", "[QueryName]", "[FieldName] = 'Something'")

Let me know if this is what you need as there are other methods

--
Wayne
Manchester, England.
Enjoy whatever it is you do


Dblosevn said:
I am trying to place a footer on a form which counts a subset of the records
that the form displays based on one of its fields. The form uses a query to
display its data which is extracted from company mainframe and updated
nightly. The query and forms break down the data by day and workgroup. I want
to be able to display the number of records counted by one of its fields
which is a drop down list and restricts user to a limited number of
selections.
 
D

David F Cox

I have never used DCOUNT but Help says that the first argument should be a
field name.


Dblosevn said:
I am getting an #Error message

I copied and pasted the text and changed the particulars to this:

=DCount("*","[qryStartsTbl]","[Contact Feedback] = 'Not Called'")



Wayne-I-M said:
Not really sure if I understand what you are looking for but I "think"
you
are looking to count the number of times a specific string appears in a
field
in the query that the form is based on ???

Use this is the source of an unbound text box in the form footer
=DCount("*", "[QueryName]", "[FieldName] = 'Something'")

Let me know if this is what you need as there are other methods

--
Wayne
Manchester, England.
Enjoy whatever it is you do


Dblosevn said:
I am trying to place a footer on a form which counts a subset of the
records
that the form displays based on one of its fields. The form uses a
query to
display its data which is extracted from company mainframe and updated
nightly. The query and forms break down the data by day and workgroup.
I want
to be able to display the number of records counted by one of its
fields
which is a drop down list and restricts user to a limited number of
selections.
 
G

Guest

Microsoft should realize that their "Help" is not very helpful at all and
most of the help I have gotten is either somewhere else or I figure it out on
my own. The help in MS says in one example the Field name first and another
slightly different example the table name first.

David F Cox said:
I have never used DCOUNT but Help says that the first argument should be a
field name.


Dblosevn said:
I am getting an #Error message

I copied and pasted the text and changed the particulars to this:

=DCount("*","[qryStartsTbl]","[Contact Feedback] = 'Not Called'")



Wayne-I-M said:
Not really sure if I understand what you are looking for but I "think"
you
are looking to count the number of times a specific string appears in a
field
in the query that the form is based on ???

Use this is the source of an unbound text box in the form footer
=DCount("*", "[QueryName]", "[FieldName] = 'Something'")

Let me know if this is what you need as there are other methods

--
Wayne
Manchester, England.
Enjoy whatever it is you do


:

I am trying to place a footer on a form which counts a subset of the
records
that the form displays based on one of its fields. The form uses a
query to
display its data which is extracted from company mainframe and updated
nightly. The query and forms break down the data by day and workgroup.
I want
to be able to display the number of records counted by one of its
fields
which is a drop down list and restricts user to a limited number of
selections.
 
G

Guest

Sorry my fault - I assumed you have created the lookup.

To Start
Creat 1 field and 1 lable (call the lable Stuff) in your footer (you don't
have to but it's a great cheat for variables)

In the lable insert the word Not Called
In the Text Box use this as the data
=DCount("IDField","qryStartsTbl","Contact Feedback"=[Stuff])

The ID field is the primary field of the records in your query so change
this to whatever you use (the name of the field)

I KNOW it's not how your meant to use DCount But >>>

Hope this helps
--
Wayne
Manchester, England.
Enjoy whatever it is you do


David F Cox said:
I have never used DCOUNT but Help says that the first argument should be a
field name.


Dblosevn said:
I am getting an #Error message

I copied and pasted the text and changed the particulars to this:

=DCount("*","[qryStartsTbl]","[Contact Feedback] = 'Not Called'")



Wayne-I-M said:
Not really sure if I understand what you are looking for but I "think"
you
are looking to count the number of times a specific string appears in a
field
in the query that the form is based on ???

Use this is the source of an unbound text box in the form footer
=DCount("*", "[QueryName]", "[FieldName] = 'Something'")

Let me know if this is what you need as there are other methods

--
Wayne
Manchester, England.
Enjoy whatever it is you do


:

I am trying to place a footer on a form which counts a subset of the
records
that the form displays based on one of its fields. The form uses a
query to
display its data which is extracted from company mainframe and updated
nightly. The query and forms break down the data by day and workgroup.
I want
to be able to display the number of records counted by one of its
fields
which is a drop down list and restricts user to a limited number of
selections.
 
G

Guest

Hope you have that sorted.

I have placed an unbound combo on a form I made for a firm a while back and
in the combo there were a number of criteria that managements wanted to check
on
Off Sick
At Work
Went home early
Etc

(I know big brother is watching you ...)

Anyway assuming that you have the D Count function sorted all you need to do
is select from the combo (it's not called Stuff but it would work) you can
then D Count any crteira very quickly.

Just a thought... you may want to bring into your form one day.

Good luck with your project

--
Wayne
Manchester, England.
Enjoy whatever it is you do


Wayne-I-M said:
Sorry my fault - I assumed you have created the lookup.

To Start
Creat 1 field and 1 lable (call the lable Stuff) in your footer (you don't
have to but it's a great cheat for variables)

In the lable insert the word Not Called
In the Text Box use this as the data
=DCount("IDField","qryStartsTbl","Contact Feedback"=[Stuff])

The ID field is the primary field of the records in your query so change
this to whatever you use (the name of the field)

I KNOW it's not how your meant to use DCount But >>>

Hope this helps
--
Wayne
Manchester, England.
Enjoy whatever it is you do


David F Cox said:
I have never used DCOUNT but Help says that the first argument should be a
field name.


Dblosevn said:
I am getting an #Error message

I copied and pasted the text and changed the particulars to this:

=DCount("*","[qryStartsTbl]","[Contact Feedback] = 'Not Called'")



:

Not really sure if I understand what you are looking for but I "think"
you
are looking to count the number of times a specific string appears in a
field
in the query that the form is based on ???

Use this is the source of an unbound text box in the form footer
=DCount("*", "[QueryName]", "[FieldName] = 'Something'")

Let me know if this is what you need as there are other methods

--
Wayne
Manchester, England.
Enjoy whatever it is you do


:

I am trying to place a footer on a form which counts a subset of the
records
that the form displays based on one of its fields. The form uses a
query to
display its data which is extracted from company mainframe and updated
nightly. The query and forms break down the data by day and workgroup.
I want
to be able to display the number of records counted by one of its
fields
which is a drop down list and restricts user to a limited number of
selections.
 
G

Guest

OK, you said to call the label "Stuff" then you said "Not Called". Which is it?

Wayne-I-M said:
Sorry my fault - I assumed you have created the lookup.

To Start
Creat 1 field and 1 lable (call the lable Stuff) in your footer (you don't
have to but it's a great cheat for variables)

In the lable insert the word Not Called
In the Text Box use this as the data
=DCount("IDField","qryStartsTbl","Contact Feedback"=[Stuff])

The ID field is the primary field of the records in your query so change
this to whatever you use (the name of the field)

I KNOW it's not how your meant to use DCount But >>>

Hope this helps
--
Wayne
Manchester, England.
Enjoy whatever it is you do


David F Cox said:
I have never used DCOUNT but Help says that the first argument should be a
field name.


Dblosevn said:
I am getting an #Error message

I copied and pasted the text and changed the particulars to this:

=DCount("*","[qryStartsTbl]","[Contact Feedback] = 'Not Called'")



:

Not really sure if I understand what you are looking for but I "think"
you
are looking to count the number of times a specific string appears in a
field
in the query that the form is based on ???

Use this is the source of an unbound text box in the form footer
=DCount("*", "[QueryName]", "[FieldName] = 'Something'")

Let me know if this is what you need as there are other methods

--
Wayne
Manchester, England.
Enjoy whatever it is you do


:

I am trying to place a footer on a form which counts a subset of the
records
that the form displays based on one of its fields. The form uses a
query to
display its data which is extracted from company mainframe and updated
nightly. The query and forms break down the data by day and workgroup.
I want
to be able to display the number of records counted by one of its
fields
which is a drop down list and restricts user to a limited number of
selections.
 

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

Similar Threads


Top