Query Count (1 Viewer)

Pat Hartman

Super Moderator
Staff member
Local time
Today, 05:09
Joined
Feb 19, 2002
Messages
43,331
@kitty77 Your initial question was confusing and imprecise in its context. ie. HOW are you intending to use the result? Since that determines the solution. You said you wanted to retrieve the records where the "field" was <5. Then you switched to just wanting the count. The first solution requires a query, the second can be done with a domain function using VBA or even the ControlSource property of a control. It can also be done with a totals query which is what I described (and what MajP suggested) and which is the efficient method. It can also be done with a Select query that includes a domain function which is the inefficient method and as you can see, doesn't solve any problem.

Now you seem to be back to using a domain function, hopefully NOT in a query but you need two arguments instead of one. It looks like you have settled on using the domain function in the ControlSource of a control. That will be fine.
 

Users who are viewing this thread

Top Bottom