AOB
Registered User.
- Local time
- Today, 00:31
- Joined
- Sep 26, 2012
- Messages
- 615
Hi guys,
I have a switchboard form which has a kind of dashboard element which tallies the counts of records according to a variety of pre-defined queries.
At the moment I am just using domain aggregate functions to return the counts. So the Control Source for one of the textboxes in the dashboard would look like :
So the textbox basically shows the number of records in that query
However, there are a number of these and it refreshes every 60 seconds or so. It's reasonably quick but there is a noticeable lag of a second or two every time it recalcs.
I'm wondering if I would be better off replacing all these DAF's with purpose-built queries to return the integer value. So using the example above, create a query that looks like :
Call it "qryCountPending" and then use that as the Control Source instead?
So I guess I have two questions:
Al
I have a switchboard form which has a kind of dashboard element which tallies the counts of records according to a variety of pre-defined queries.
At the moment I am just using domain aggregate functions to return the counts. So the Control Source for one of the textboxes in the dashboard would look like :
Code:
=DCount("[ID]","[qryPending]")
However, there are a number of these and it refreshes every 60 seconds or so. It's reasonably quick but there is a noticeable lag of a second or two every time it recalcs.
I'm wondering if I would be better off replacing all these DAF's with purpose-built queries to return the integer value. So using the example above, create a query that looks like :
Code:
SELECT Count(qryPending.ID) AS NumberPending
FROM qryPending
So I guess I have two questions:
- will this be in any way quicker? (I have it in my head that hard-coded queries are faster than DAF's but I could be wrong)
- if so, how do I reference it in the Control Source? Given that these queries will return a single record with a single field, but how does the Control Source "know" that (usually, you have to include some kind of WHERE clause so it knows which record to return)
Al