Query Count on Switchboard / Mainmenu

I

Ian Craig Armitage

Hi Guys,

I would like to put a few statistics on my Switchboard/Main Menu.. I was
thinking of using a few disabled textboxes or maybe the status bar (if
possible).. The type of things i want to list are things like number of
customers / jobs, number of outstanding payments etc. basically they are
all record counts. Ive made queries to get the records but i dont know how
to reference them in the textbox.. i tried putting =Count(qryCustomers) in
the record source of a text box but that didnt work..

any suggestions?

Craig
 
R

Rob Parker

Hi Craig,

Use the dCount function as the expression in your textbox:

=dCount("*","qryCustomers")

dCount (and other domain aggregate functions) has three parameters - field,
domain, criteria - each of which must be enclosed in quotes. Here, the *
wildcard is used to simply count all records, and there is no criteria
parameter, since your query is (I presume) getting only the records you
want. See the Help file for further details.

HTH,

Rob
 

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