Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting records that have salshes in a report 1

Status
Not open for further replies.

mouseman

Instructor
Apr 28, 2002
44
US
I have an access report that has a field name A/E. I want to count the records for a specific A/E. For example, the records are in a table like this:

KF/CC
KF/MD

I would like to count only the KF, So it will show a count as 2

I used the following formula, but it did not seem to work.

=DCount("[A/E]","Broker Visits","[A/E]='KF*'")

Thanks for your help in advanced

 
The only thing that I can see is that you did not update the following two lines of code as I suggested on June 18th. This could cause a data type mismatch as it doesn't understand the declaration statements due to DAO.

Dim db As DAO.Database
Dim rs As DAO.Recordset

I copied your code and it ran on my system perfectly. I made the changes above and that worked also. I have to believe that as I stated the declaration statements are not being interpreted properly. Make the changes and let's see what happens.

Bob Scriver
 
Bob,

Thank you very much, it works like a charm, Thanks again, we finally got it.

Stephen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top