sum of records displayed on switchboard?

M

Maax

Hello all, I have a report that lists all records that have a status of
"open". At report lists the sum of records at the bottom (just using the
built in sum command on access 2007).
I would like to display this sum on my switchboard so that the amount of
records open is visible at all times.

I used this " =Sum([All Open Quotes]![Part Number])" which i thought was
working until i closed the "all open quotes" form.

I would like to have the information available all of the time independant
of any other forms or reports being open.

Is this possible? I am sure it is but not able to achieve it yet.

any help appreciated.
 
D

Damian S

Hi Maax,

Use dsum, like this:

=dsum("FIELD_TO_SUM", "TABLE_NAME", "OPTIONALLY_HAVE_A_WHERE_CLAUSE")

Damian.
 
M

Maax

Hi Damian, as simple and straight forward as your reply is, i cant seem to
get it to work? I added a text box to my switchboard and entered in the
before update event "=dsum ("part number", "assembly detail") and i get an
error.I am unsure of the "OPTIONALLY_HAVE_A_WHERE_CLAUSE" bit?
it may be worth mentioning that i need the sum to simply count the number of
"part numbers" as in the number of records (not add up the data in part
numbers)

thanks




Damian S said:
Hi Maax,

Use dsum, like this:

=dsum("FIELD_TO_SUM", "TABLE_NAME", "OPTIONALLY_HAVE_A_WHERE_CLAUSE")

Damian.

Maax said:
Hello all, I have a report that lists all records that have a status of
"open". At report lists the sum of records at the bottom (just using the
built in sum command on access 2007).
I would like to display this sum on my switchboard so that the amount of
records open is visible at all times.

I used this " =Sum([All Open Quotes]![Part Number])" which i thought was
working until i closed the "all open quotes" form.

I would like to have the information available all of the time independant
of any other forms or reports being open.

Is this possible? I am sure it is but not able to achieve it yet.

any help appreciated.
 
D

Damian S

Ah, well that makes all the difference... you want dcount, not dsum. ;-)

In the control source for your textbox, have the following:

=dcount("part number", "assembly detail")

Damian.

Maax said:
Hi Damian, as simple and straight forward as your reply is, i cant seem to
get it to work? I added a text box to my switchboard and entered in the
before update event "=dsum ("part number", "assembly detail") and i get an
error.I am unsure of the "OPTIONALLY_HAVE_A_WHERE_CLAUSE" bit?
it may be worth mentioning that i need the sum to simply count the number of
"part numbers" as in the number of records (not add up the data in part
numbers)

thanks




Damian S said:
Hi Maax,

Use dsum, like this:

=dsum("FIELD_TO_SUM", "TABLE_NAME", "OPTIONALLY_HAVE_A_WHERE_CLAUSE")

Damian.

Maax said:
Hello all, I have a report that lists all records that have a status of
"open". At report lists the sum of records at the bottom (just using the
built in sum command on access 2007).
I would like to display this sum on my switchboard so that the amount of
records open is visible at all times.

I used this " =Sum([All Open Quotes]![Part Number])" which i thought was
working until i closed the "all open quotes" form.

I would like to have the information available all of the time independant
of any other forms or reports being open.

Is this possible? I am sure it is but not able to achieve it yet.

any help appreciated.
 
M

Maax

Hi Damian, its still not working. I have a question- if i use the code you
supplied below, how does the Dcount function know to look at the "assembly
detail" report as opposed to a table or form.

I already have a query that lists the number of records with as status of <>
"complete" this in turn runs the report where i have a simple count function
at the botom of the page.

also when i try and enter data into the control source it does not stay
there. I can only get data to save there if i use the expression builder?

i kind of thought the code would be something like,

"=dcount [all open quotes]![part number]"

Like i said above, when i enter data in the control source, as soon as i run
it and open it up again the adta has gone?









Damian S said:
Ah, well that makes all the difference... you want dcount, not dsum. ;-)

In the control source for your textbox, have the following:

=dcount("part number", "assembly detail").




Damian.

Maax said:
Hi Damian, as simple and straight forward as your reply is, i cant seem to
get it to work? I added a text box to my switchboard and entered in the
before update event "=dsum ("part number", "assembly detail") and i get an
error.I am unsure of the "OPTIONALLY_HAVE_A_WHERE_CLAUSE" bit?
it may be worth mentioning that i need the sum to simply count the number of
"part numbers" as in the number of records (not add up the data in part
numbers)

thanks




Damian S said:
Hi Maax,

Use dsum, like this:

=dsum("FIELD_TO_SUM", "TABLE_NAME", "OPTIONALLY_HAVE_A_WHERE_CLAUSE")

Damian.

:

Hello all, I have a report that lists all records that have a status of
"open". At report lists the sum of records at the bottom (just using the
built in sum command on access 2007).
I would like to display this sum on my switchboard so that the amount of
records open is visible at all times.

I used this " =Sum([All Open Quotes]![Part Number])" which i thought was
working until i closed the "all open quotes" form.

I would like to have the information available all of the time independant
of any other forms or reports being open.

Is this possible? I am sure it is but not able to achieve it yet.

any help appreciated.
 
D

Damian S

Hi Maax,

The dcount function works on a table or query. You can't pass a report to
dcount and get it to count something - that's not how it works.

What is the query that is driving your report? Use that in the dcount. I
have been assuming that you were talking about on a form (since you talked
about adding a field to your switchboard).

If you are talking about a field on your report itself, you can simply have
=count([FIELDNAME]) as the record source.

Damian.

Maax said:
Hi Damian, its still not working. I have a question- if i use the code you
supplied below, how does the Dcount function know to look at the "assembly
detail" report as opposed to a table or form.

I already have a query that lists the number of records with as status of <>
"complete" this in turn runs the report where i have a simple count function
at the botom of the page.

also when i try and enter data into the control source it does not stay
there. I can only get data to save there if i use the expression builder?

i kind of thought the code would be something like,

"=dcount [all open quotes]![part number]"

Like i said above, when i enter data in the control source, as soon as i run
it and open it up again the adta has gone?









Damian S said:
Ah, well that makes all the difference... you want dcount, not dsum. ;-)

In the control source for your textbox, have the following:

=dcount("part number", "assembly detail").




Damian.

Maax said:
Hi Damian, as simple and straight forward as your reply is, i cant seem to
get it to work? I added a text box to my switchboard and entered in the
before update event "=dsum ("part number", "assembly detail") and i get an
error.I am unsure of the "OPTIONALLY_HAVE_A_WHERE_CLAUSE" bit?
it may be worth mentioning that i need the sum to simply count the number of
"part numbers" as in the number of records (not add up the data in part
numbers)

thanks




:

Hi Maax,

Use dsum, like this:

=dsum("FIELD_TO_SUM", "TABLE_NAME", "OPTIONALLY_HAVE_A_WHERE_CLAUSE")

Damian.

:

Hello all, I have a report that lists all records that have a status of
"open". At report lists the sum of records at the bottom (just using the
built in sum command on access 2007).
I would like to display this sum on my switchboard so that the amount of
records open is visible at all times.

I used this " =Sum([All Open Quotes]![Part Number])" which i thought was
working until i closed the "all open quotes" form.

I would like to have the information available all of the time independant
of any other forms or reports being open.

Is this possible? I am sure it is but not able to achieve it yet.

any help appreciated.
 

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