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!
pietlinden@hotmail.com - 19 Jul 2007 03:22 GMT
On Jul 17, 2:34 pm, TheRafterMan
<TheRafter...@discussions.microsoft.com> wrote:
> 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
[quoted text clipped - 21 lines]
> 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...
TheRafterMan - 19 Jul 2007 14:16 GMT
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?
> On Jul 17, 2:34 pm, TheRafterMan
> <TheRafter...@discussions.microsoft.com> wrote:
[quoted text clipped - 29 lines]
>
> Then you can create group totals...
Douglas J. Steele - 19 Jul 2007 14:56 GMT
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)

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> imsorry but tihs is not specific enough for me, i need things spelled out.
> I
[quoted text clipped - 45 lines]
>>
>> Then you can create group totals...
TheRafterMan - 19 Jul 2007 15:20 GMT
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.
> Actually, CountYes and CountNo are just labels for what the formulae do.
>
[quoted text clipped - 53 lines]
> >>
> >> Then you can create group totals...