SUM issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

my report record source is a query.. i have a field called amount in there
(in the query).. on my report footer i have the control source = sum
([amount]) - there is nothing wrong with this.. it is working properly.. the
problem is i want this total amount another place on my report (in my page
header).. i have the same exact control source as my total field in the
report footer but i get #error in that field when i run my report.. i even
made a copy of the one that is working (in my report footer) and dragged it
to my header and it still doesn't work.. any ideas anyone?.. there are no
fields on my report called amount either.. i'm stumped. thanks!
 
If the name of the control in the Report Footer is "txtSumAmount" then try a
control source in the Page Header of
=txtSumAmount
 
Thank you!.. that did it!.. one more question.. one of these reports is run
from a command button on a window of mine.. i would say most of the time the
report comes up good (with the data that the user entered on the form (same
form as the command button i mentioned) but oncec in awhile.. the report
opens up with no data (that the user entered).. this is strange.. do you know
why this would happen??.. thanks again for the answer to my total problem.

Duane Hookom said:
If the name of the control in the Report Footer is "txtSumAmount" then try a
control source in the Page Header of
=txtSumAmount

--
Duane Hookom
MS Access MVP


lp said:
my report record source is a query.. i have a field called amount in there
(in the query).. on my report footer i have the control source = sum
([amount]) - there is nothing wrong with this.. it is working properly.. the
problem is i want this total amount another place on my report (in my page
header).. i have the same exact control source as my total field in the
report footer but i get #error in that field when i run my report.. i even
made a copy of the one that is working (in my report footer) and dragged it
to my header and it still doesn't work.. any ideas anyone?.. there are no
fields on my report called amount either.. i'm stumped. thanks!
 
You should cause the record to save prior to printing the report.
DoCmd.RunCommand acCmdSaveRecord

--
Duane Hookom
MS Access MVP


lp said:
Thank you!.. that did it!.. one more question.. one of these reports is run
from a command button on a window of mine.. i would say most of the time the
report comes up good (with the data that the user entered on the form (same
form as the command button i mentioned) but oncec in awhile.. the report
opens up with no data (that the user entered).. this is strange.. do you know
why this would happen??.. thanks again for the answer to my total problem.

Duane Hookom said:
If the name of the control in the Report Footer is "txtSumAmount" then try a
control source in the Page Header of
=txtSumAmount

--
Duane Hookom
MS Access MVP


lp said:
my report record source is a query.. i have a field called amount in there
(in the query).. on my report footer i have the control source = sum
([amount]) - there is nothing wrong with this.. it is working
properly..
the
problem is i want this total amount another place on my report (in my page
header).. i have the same exact control source as my total field in the
report footer but i get #error in that field when i run my report.. i even
made a copy of the one that is working (in my report footer) and
dragged
it
to my header and it still doesn't work.. any ideas anyone?.. there are no
fields on my report called amount either.. i'm stumped. thanks!
 
thank you!.. i'll give it a try.. being that this is a "new" entry form.. do
you think it's a good idea for me to tell them them must save (hit save
button).. before they are allowed to 'preview' the report? thanks.

Duane Hookom said:
You should cause the record to save prior to printing the report.
DoCmd.RunCommand acCmdSaveRecord

--
Duane Hookom
MS Access MVP


lp said:
Thank you!.. that did it!.. one more question.. one of these reports is run
from a command button on a window of mine.. i would say most of the time the
report comes up good (with the data that the user entered on the form (same
form as the command button i mentioned) but oncec in awhile.. the report
opens up with no data (that the user entered).. this is strange.. do you know
why this would happen??.. thanks again for the answer to my total problem.

Duane Hookom said:
If the name of the control in the Report Footer is "txtSumAmount" then try a
control source in the Page Header of
=txtSumAmount

--
Duane Hookom
MS Access MVP


my report record source is a query.. i have a field called amount in there
(in the query).. on my report footer i have the control source = sum
([amount]) - there is nothing wrong with this.. it is working properly..
the
problem is i want this total amount another place on my report (in my page
header).. i have the same exact control source as my total field in the
report footer but i get #error in that field when i run my report.. i even
made a copy of the one that is working (in my report footer) and dragged
it
to my header and it still doesn't work.. any ideas anyone?.. there are no
fields on my report called amount either.. i'm stumped. thanks!
 
Your code for printing the report should include the line of code to save
the record prior to opening the report. The user should not have to do
anything.

--
Duane Hookom
MS Access MVP


lp said:
thank you!.. i'll give it a try.. being that this is a "new" entry form.. do
you think it's a good idea for me to tell them them must save (hit save
button).. before they are allowed to 'preview' the report? thanks.

Duane Hookom said:
You should cause the record to save prior to printing the report.
DoCmd.RunCommand acCmdSaveRecord

--
Duane Hookom
MS Access MVP


lp said:
Thank you!.. that did it!.. one more question.. one of these reports
is
run
from a command button on a window of mine.. i would say most of the
time
the
report comes up good (with the data that the user entered on the form (same
form as the command button i mentioned) but oncec in awhile.. the report
opens up with no data (that the user entered).. this is strange.. do
you
know
why this would happen??.. thanks again for the answer to my total problem.

:

If the name of the control in the Report Footer is "txtSumAmount"
then
try a
control source in the Page Header of
=txtSumAmount

--
Duane Hookom
MS Access MVP


my report record source is a query.. i have a field called amount
in
there
(in the query).. on my report footer i have the control source = sum
([amount]) - there is nothing wrong with this.. it is working properly..
the
problem is i want this total amount another place on my report (in
my
page
header).. i have the same exact control source as my total field
in
the
report footer but i get #error in that field when i run my
report.. i
even
made a copy of the one that is working (in my report footer) and dragged
it
to my header and it still doesn't work.. any ideas anyone?.. there
are
no
fields on my report called amount either.. i'm stumped. thanks!
 
ok.. thanks.. i understand what you're saying.. but being
that there is a 'Cancel' button also on the form.. i
didn't know if the user should be able to enter data,
preview the report BUT THEN decide to cancel the entry..
what do you think. sorry for all the questions. thanks
for your help!
-----Original Message-----
Your code for printing the report should include the line of code to save
the record prior to opening the report. The user should not have to do
anything.

--
Duane Hookom
MS Access MVP


lp said:
thank you!.. i'll give it a try.. being that this is
a "new" entry form..
do
you think it's a good idea for me to tell them them must save (hit save
button).. before they are allowed to 'preview' the report? thanks.
of these reports
is say most of the
time in awhile.. the
report this is strange.. do
you answer to my total
problem. is "txtSumAmount"
then field called amount
in control source =
sum
([amount]) - there is nothing wrong with this.. it is working
properly..
the
problem is i want this total amount another
place on my report (in
my as my total field
in when i run my
report.. i ideas anyone?.. there
are

.
 
This is a business decision on your part. You and your users have to decide
how you want to do this. The form has a "Dirty" property that suggests if
the data has been saved.

--
Duane Hookom
MS Access MVP


ok.. thanks.. i understand what you're saying.. but being
that there is a 'Cancel' button also on the form.. i
didn't know if the user should be able to enter data,
preview the report BUT THEN decide to cancel the entry..
what do you think. sorry for all the questions. thanks
for your help!
-----Original Message-----
Your code for printing the report should include the line of code to save
the record prior to opening the report. The user should not have to do
anything.

--
Duane Hookom
MS Access MVP


lp said:
thank you!.. i'll give it a try.. being that this is
a "new" entry form..
do
you think it's a good idea for me to tell them them must save (hit save
button).. before they are allowed to 'preview' the report? thanks.

:

You should cause the record to save prior to printing the report.
DoCmd.RunCommand acCmdSaveRecord

--
Duane Hookom
MS Access MVP


news:511C2E9D-F0A2-4200-B90A- (e-mail address removed)...
Thank you!.. that did it!.. one more question.. one
of these reports
is
run
from a command button on a window of mine.. i would
say most of the
time
the
report comes up good (with the data that the user entered on the form
(same
form as the command button i mentioned) but oncec
in awhile.. the
report
opens up with no data (that the user entered)..
this is strange.. do
you
know
why this would happen??.. thanks again for the
answer to my total
problem.
:

If the name of the control in the Report Footer
is "txtSumAmount"
then
try a
control source in the Page Header of
=txtSumAmount

--
Duane Hookom
MS Access MVP


news:E798292B-FD42-4C1E-B730- (e-mail address removed)...
my report record source is a query.. i have a
field called amount
in
there
(in the query).. on my report footer i have the
control source =
sum
([amount]) - there is nothing wrong with this.. it is working
properly..
the
problem is i want this total amount another
place on my report (in
my
page
header).. i have the same exact control source
as my total field
in
the
report footer but i get #error in that field
when i run my
report.. i
even
made a copy of the one that is working (in my report footer) and
dragged
it
to my header and it still doesn't work.. any
ideas anyone?.. there
are
no
fields on my report called amount either.. i'm stumped. thanks!


.
 
you're right!...thank you for all of your time and help!..
much appreciated!
-----Original Message-----
This is a business decision on your part. You and your users have to decide
how you want to do this. The form has a "Dirty" property that suggests if
the data has been saved.

--
Duane Hookom
MS Access MVP


ok.. thanks.. i understand what you're saying.. but being
that there is a 'Cancel' button also on the form.. i
didn't know if the user should be able to enter data,
preview the report BUT THEN decide to cancel the entry..
what do you think. sorry for all the questions. thanks
for your help!
-----Original Message-----
Your code for printing the report should include the
line
of code to save
the record prior to opening the report. The user should not have to do
anything.

--
Duane Hookom
MS Access MVP


news:A9D4FE09-74D6-4554-95B3- (e-mail address removed)...
thank you!.. i'll give it a try.. being that this is a "new" entry form..
do
you think it's a good idea for me to tell them them must save (hit save
button).. before they are allowed to 'preview' the report? thanks.

:

You should cause the record to save prior to
printing
the report.
DoCmd.RunCommand acCmdSaveRecord

--
Duane Hookom
MS Access MVP


news:511C2E9D-F0A2-4200-B90A- (e-mail address removed)...
Thank you!.. that did it!.. one more question..
one
of these reports
is
run
from a command button on a window of mine.. i
would
say most of the
time
the
report comes up good (with the data that the user entered on the form
(same
form as the command button i mentioned) but oncec in awhile.. the
report
opens up with no data (that the user entered).. this is strange.. do
you
know
why this would happen??.. thanks again for the answer to my total
problem.

:

If the name of the control in the Report Footer is "txtSumAmount"
then
try a
control source in the Page Header of
=txtSumAmount

--
Duane Hookom
MS Access MVP



(e-mail address removed)...
my report record source is a query.. i have a field called amount
in
there
(in the query).. on my report footer i have
the
control source =
sum
([amount]) - there is nothing wrong with
this..
it is working
properly..
the
problem is i want this total amount another place on my report (in
my
page
header).. i have the same exact control
source
as my total field
in
the
report footer but i get #error in that field when i run my
report.. i
even
made a copy of the one that is working (in my report footer) and
dragged
it
to my header and it still doesn't work.. any ideas anyone?.. there
are
no
fields on my report called amount either..
i'm
stumped. thanks!


.
 
Back
Top