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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|