=Nz(Dcount("*","[YourQuery
mx
Main Topics
Browse All TopicsMS Access 2002: How would I populate a text box on a form from the count results from a query?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The relation of the text field (for count) on the form is to the data shown on the form itself. I am counting several fields of the data shown on the form but in the upper left corner of the form I am showing different counts. It will be possible to filter this data as well. So I really need to point the count from the data shown on the form in case the user decides to filter the data as well.
I'm still unclear as to what the data looks like, or how you're displaying it, but I think if you used grouping in your query, you could accomplish this. Open your query, click on the View menu, click Totals. This will add a row to your query designer called Total. All of your current output fields will have a Total value of Group By. If you stopped here, you'd have the same output as before, except you'd have only one occurrence of each record. For each field you want to have a count of, create another column for that field and change it's Total value to Count. In your output, you'll have new fields called CountofField1, CountofField2, etc. (except Field1/Field2 will be your field names). Then you can display those on your form and filter by them, sort by them, whatever.
Business Accounts
Answer for Membership
by: jpipkinsPosted on 2008-02-21 at 21:20:40ID: 20954840
you can use dcount. What is the relationship between the data on the form and the query that contains the count.