counter on report/search via user input on form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having a couple small predicaments regarding amy access database. I
would like to add a counter on the bottom of my reports. So under each field
in my report there are records, and depending on which field, there are some
without records. Here is an example:

NAME DIVISION Y/N

John Smith one Yes

Jane Doe two No

Jane Smith - -


So I would like to set up a counter that counts how many names there are,
how many divisions people are in, and how many "Yes" are listed, all at the
bottom of each column in the report. How can I go about doing this?

Another question,

Using the same example above except in a form, how can I add a command
button, that when clicked (I guess one for each field), can allow a user to
enter part of the search. So if I somehow added this button and a prompt
came up, and I entered "two" for the division name, everyone who was in
division "two" would show up and nothing else. How would I be able to do
that? Thanks in advance!
 
I am having a couple small predicaments regarding amy access database. I
would like to add a counter on the bottom of my reports. So under each field
in my report there are records, and depending on which field, there are some
without records. Here is an example:

NAME DIVISION Y/N

John Smith one Yes

Jane Doe two No

Jane Smith - -

So I would like to set up a counter that counts how many names there are,
how many divisions people are in, and how many "Yes" are listed, all at the
bottom of each column in the report. How can I go about doing this?

Another question,

Using the same example above except in a form, how can I add a command
button, that when clicked (I guess one for each field), can allow a user to
enter part of the search. So if I somehow added this button and a prompt
came up, and I entered "two" for the division name, everyone who was in
division "two" would show up and nothing else. How would I be able to do
that? Thanks in advance!

create a hidden control on your report in the detail section
CountYes=IIF(SomeField="Yes",1,0)
CountNo=IIF(SomeField="No",1,0)

Then you can create group totals...
 
imsorry but tihs is not specific enough for me, i need things spelled out. I
added a textbox in the detail section and typed in
CountYes=IIF(SomeField="Yes",1,0)
of course for SomeField I put the actual field. But what else am I supposed
to do to get this to work?
 
Actually, CountYes and CountNo are just labels for what the formulae do.

For the text box you've created, set its ControlSource property to

=IIF(SomeField="Yes",1,0)

(including the equal sign)
 
so far you guys have been helpful, so i made the textbox and did that, but
what im trying to do is, get it count the amount of "Yes" in the Y/N column
for the whole report. so if theres 10 "Yes" and two "No", doesn't matter how
many "No" there are, it would just say "10" at the bottom of the page.
Thanks a lot guys.
 
Back
Top