A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Totals in footer



 
 
Thread Tools Display Modes
  #1  
Old August 9th, 2007, 01:24 AM posted to microsoft.public.access.reports
Tom Knox
external usenet poster
 
Posts: 2
Default Totals in footer

I have an unbound field in my Detail section. I update this field via VB
called by the On Format property of the Detail section. I named the field
"rental_fee". When I try to summarize this field in the Report Footer,
"=sum(rental_fee), I get the "Enter Parameter Value -- rental_fee" message.

How do I get a total of this field (rental_fee) in the Report Footer.

Any help would be appreciated.

Thanks

Tom Knox


  #2  
Old August 9th, 2007, 01:41 AM posted to microsoft.public.access.reports
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default Totals in footer

In order to use Sum function, it must reference a field or fields in the
report's RecordSource query. You cannot use a control in the Sum function's
argument(s).

So, you likely need to change that unbound textbox to a calculated textbox,
where you put an expression in its ControlSource instead of using the VBA
progamming to put a value into the textbox.

If you give us more details about your report's RecordSource query and the
VBA code that you're using, we should be able to make specific suggestions.

--

Ken Snell
MS ACCESS MVP


"Tom Knox" wrote in message
...
I have an unbound field in my Detail section. I update this field via VB
called by the On Format property of the Detail section. I named the field
"rental_fee". When I try to summarize this field in the Report Footer,
"=sum(rental_fee), I get the "Enter Parameter Value -- rental_fee" message.

How do I get a total of this field (rental_fee) in the Report Footer.

Any help would be appreciated.

Thanks

Tom Knox



  #3  
Old August 13th, 2007, 09:47 PM posted to microsoft.public.access.reports
Tom Knox
external usenet poster
 
Posts: 2
Default Totals in footer

Ken

Thanks for response

I changed my record source to a table which I updated using a previous
routine. Your response got me on the right track

Thanks again

Tom
"Ken Snell (MVP)" wrote in message
...
In order to use Sum function, it must reference a field or fields in the
report's RecordSource query. You cannot use a control in the Sum
function's argument(s).

So, you likely need to change that unbound textbox to a calculated
textbox, where you put an expression in its ControlSource instead of using
the VBA progamming to put a value into the textbox.

If you give us more details about your report's RecordSource query and the
VBA code that you're using, we should be able to make specific
suggestions.

--

Ken Snell
MS ACCESS MVP


"Tom Knox" wrote in message
...
I have an unbound field in my Detail section. I update this field via VB
called by the On Format property of the Detail section. I named the field
"rental_fee". When I try to summarize this field in the Report Footer,
"=sum(rental_fee), I get the "Enter Parameter Value -- rental_fee"
message.

How do I get a total of this field (rental_fee) in the Report Footer.

Any help would be appreciated.

Thanks

Tom Knox





  #4  
Old August 15th, 2007, 05:04 AM posted to microsoft.public.access.reports
Larry Linson
external usenet poster
 
Posts: 3,112
Default Totals in footer


"Ken Snell (MVP)" wrote in message
...
In order to use Sum function, it must reference a field or fields in the
report's RecordSource query. You cannot use a control in the Sum
function's argument(s).


I'll add that, unless you jump through some hoops, calculations in VBA event
code may be repeated... that is, the Format and/or Print events may be
repeated, and may be performed in an order that isn't exactly what you'd
expect (at least, I discovered 'way back in Access 2 days that it wasn't
necessarily the order I would have expected). If it's a matter of simply
setting a control to a value, perhaps no promblem. But, if you are
accumulating a value / total, you may be accumulating more than you
expected.

I try to avoid calculations in Report event code for this reason. And when
I use them, I try to be very careful.

Larry Linson
Microsoft Access MVP


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.