How to use a query to "count" then pass on that number to a form

G

Guest

I want to make a query that counts the number of records then passes it onto
a textbox on a form. I managed to create a query to count, but i dont know
how to bring that number and put it into a textbox. I will want it to do it
on an afterupdate of a diffrent item on the form.

thank you
 
J

John Vinson

I want to make a query that counts the number of records then passes it onto
a textbox on a form. I managed to create a query to count, but i dont know
how to bring that number and put it into a textbox. I will want it to do it
on an afterupdate of a diffrent item on the form.

thank you

The simplest way is probably to set the Control Source of the textbox
to

=DCount("*", "tablename", "criteria")

rather than using a totals query.

John W. Vinson[MVP]
 

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