Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with calculated field in report 1

Status
Not open for further replies.

tonywilliams

Technical User
Jul 27, 2003
29
GB
Can anyone tell me what's wrong with this formula?
([Sum Of txtClients0]*[txtclientstotal])/[Sum Of txtClientsTot]
TxtClientstotal is a calculated on the report the other controls come from a query.
I get an error message asking for Extra "(" in the formula.
I've tried putting () around most things but still get the same answer.
TIA
Tony
 
Sorry just realised that missed off = sign. However I now get #Error. Anyone see why?
Thanks
Tony
 
Could [Sum of txtClientsTot] ever be zero?

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Usually I get #Error when it's trying to divide by zero

try separating out each element and see what the values are in them--i mean make three separate text boxes, one with
=[Sum Of txtClients0], one with =txtclientstotal and one with =[Sum Of txtClientsTot] and see what their values are.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
then do an additional one

=([Sum Of txtClients0]*[txtclientstotal])

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I think I've cracked it. I created a new text box and put the formula in there and it worked. So I think I need to replace all the controls where I want this calculation to work with new text boxes. Although I don't know why it should work this way and not with the origional controls?????
Thanks for your help Ginger
 
don't know. sometimes fiddling with one text box, copying and pasting various things...you might inadvertently get some character in there, a space or some other funky character that you don't even see...maybe a paragraph mark or something, who knows. I usually just do what I stepped you through....just troubleshooting, picking it all apart til I find the problem. Glad it worked out for you!

g

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks again for all your help. I will certainly adopt your troubleshooting idea in future it makes good sense. Learning Access is one thing learning what to do when things go wrong is something different. That's why us newbies need guys like you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top