Re: Creating a Dashboard of Global Values

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Frank Camean (frank.camean_at_4sight.org)
Date: 09/12/04


Date: Sat, 11 Sep 2004 21:08:15 -0700

Dirk,

My dashboard form will always be sitting in the
background. To get it to update, you said I need to write
code as follows....

    Forms!DASHBOARD.Recalc

Dirk, do I add that to the "ON CURRENT" event? Or do I
add that elsewhere? In short, where and how do I add this
code to make sure my form is constantly
refreshed/recalculated?

I'm thinking of adding a REFRESH BUTTON to do the
refresh. What do u think?

Thanks.

Frank

>-----Original Message-----
>"Frank Camean" <frank.camean@4sight.org> wrote in message
>news:075201c4982c$9d35d3b0$a301280a@phx.gbl
>> I'm trying to create a dashboard for my Access
>> application. On that dashboard I want to have a global
>> representation of the entire DB. I have my own Real
>> Estate application with multiple tables. On that
>> dashboard I want to have TOTAL # OF CONTACTS, TOTAL # OF
>> PROPERTIES, TOTAL # OF TASKS, TOTAL # OF TENANTS, etc...
>>
>> I have a simple query that counts the number of records
in
>> each table. For instance, on my CONTACTS table, I have
a
>> query that COUNTS all the ID #'s for that table. It
>> successfully returns a value. So the query is fine.
>> However, on the DASHBOARD FORM, I created a TEXT BOX
field
>> and in the properties under CONTROL SOURCE, I linked it
to
>> the QUERY result. But when I run the form, I get #Name?
>> as the value. The QUERY of course only has one
record. I
>> also created my own DASHBOARD Table as another approach.
>> And for the TOTAL CONTACTS field, I linked it to the
QUERY
>> result as well. But again, I get #Name?
>>
>> In short, how can I create a DASHBOARD form that can
give
>> me a global representation of my DB? I want to gather
the
>> total number of records for each table and present that
on
>> my dashboard. Is there a way to do this? Please help.
>> thanks.
>>
>> Frank
>
>To get a value from your query, seeing as how your form
isn't bound to
>that query, you'll have to use a DLookup expression; for
example,
>
> =DLookup("TotalContacts", "qryCountContacts")
>
>But you don't really need to create a separate query for
each of these
>text boxes. You can use the DCount function in
ControlSource
>expressions in each of the four text boxes.
>
> =DCount("*", "CONTACTS")
>
> =DCount("*", "PROPERTIES")
>
> =DCount("*", "TASKS")
>
> =DCount("*", "TENANTS")
>
>One thing to be aware of is that, as you add or delete
records from
>these tables, these text boxes won't automatically
update. You must use
>code to recalculate them whenever that occurs; e.g.,
>
> Forms!DASHBOARD.Recalc
>
>--
>Dirk Goldgar, MS Access MVP
>www.datagnostics.com
>
>(please reply to the newsgroup)
>
>
>.
>


Quantcast