# MS Access And Counting Results

**URL:** <https://forum.kirupa.com/t/ms-access-and-counting-results/221112>\
**Category:** random\
**Created:** [April 1, 2007, 3:52pm UTC](https://forum.kirupa.com/t/ms-access-and-counting-results/221112 "2007-04-01T15:52:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben\_is\_sparky](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ben_is_sparky/32/664_2.png) [@ben\_is\_sparky](https://forum.kirupa.com/u/ben_is_sparky)\
**Post date:** [April 1, 2007, 3:52pm UTC](https://forum.kirupa.com/t/ms-access-and-counting-results/221112/1 "2007-04-01T15:52:50Z")

</div>

Ok I don’t know if this is the best place to ask this, but I figured that you’re all pretty smart people and there’s a fairly good chance of someone being able to help me out. [COLOR=black](also, I’m not sure if there’s a more appropriate section, but I couldn’t see it…)[/COLOR]

So I’ve got a report in access that lists the results of a query. What I want to do is to have some sort of error message if there’s no results in the set.

My first instinct was to have a Text box which showed how many entries there were and so the user would be ableto see if it was 0. I had this as the ‘control source’ :

```auto
=Count([CuttingID])

```

That works fine except that if there’s no results, it shows **#Error** and I can’t work out a way of getting it to count the results, even if there aren’t any.

Is there a way to do what I’m trying to do, or even better, an (easy) way to have say a pop up message tell the user that there’s no results.

As you can guess, I’m not that confident in Access so I’m a bit stuck.

Thanks!

Edit:  
OK I’ve got it now - had to add an IF into the button on the form that calls the query.

Nice excuse to come back to KF though :sc:
