getting 'count' of filtered items?

D

djc

What is a good way to get the count of records present after a filter has
been applied? My setup: I have a 'main' bound form. I have a seperate
unbound form used to enter in criteria that ultimately becomes filter
criteria to use the FilterOn method for the 'main' form. On the other form
where the criteria is set I have a text box that I want to display the
number of items returned by the search. The search of course is just the
filter being applied.

how can I obtain the number of records in the current filter to display?
 
H

Hugh O'Neill

djc said:
What is a good way to get the count of records present after a filter
has been applied? My setup: I have a 'main' bound form. I have a
seperate unbound form used to enter in criteria that ultimately
becomes filter criteria to use the FilterOn method for the 'main'
form. On the other form where the criteria is set I have a text box
that I want to display the number of items returned by the search.
The search of course is just the filter being applied.

how can I obtain the number of records in the current filter to
display?


Have a look in Help at the DCount() function. That ought to do what
you want.

hth

Hugh
 

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