M
Matt
I have a subform that I am trying to Sum the Time Spent * Rate. I have a
field in the db called TimeSpent that stores the number of minutes worked.
I have another field called Rate, that keeps track of the Hourly Rate. In
the detail of my form I created a control named txtTotal. The value of this
control was set to "= ([TimeSpent]/60) * [Rate]". This value calculates
perfectly, but when I put another control in my form footer named
txtGrandTotal, and set its value to "=Sum([txtTotal])", all I get is #Error.
Everything I have read shows that this is the way to do it, but everything I
have tried just gives me #Error. Just to see if I could even get it to
return a value, I tried "=Sum([TimeSpent]) * Sum([Rate])" and that actually
worked (of course, the value returned doesn't help any). So I tried
"=Sum([TimeSpent] * [Rate])" and that returns #Error. The fact that
"=Sum([TimeSpent]) * Sum([Rate])" actually returns a value makes me think
that everything is referenced correctly, I just don't know why it won't work
when Summing a control. Any one have any ideas with what would be causing
this?
Thanks for any help,
Matt
field in the db called TimeSpent that stores the number of minutes worked.
I have another field called Rate, that keeps track of the Hourly Rate. In
the detail of my form I created a control named txtTotal. The value of this
control was set to "= ([TimeSpent]/60) * [Rate]". This value calculates
perfectly, but when I put another control in my form footer named
txtGrandTotal, and set its value to "=Sum([txtTotal])", all I get is #Error.
Everything I have read shows that this is the way to do it, but everything I
have tried just gives me #Error. Just to see if I could even get it to
return a value, I tried "=Sum([TimeSpent]) * Sum([Rate])" and that actually
worked (of course, the value returned doesn't help any). So I tried
"=Sum([TimeSpent] * [Rate])" and that returns #Error. The fact that
"=Sum([TimeSpent]) * Sum([Rate])" actually returns a value makes me think
that everything is referenced correctly, I just don't know why it won't work
when Summing a control. Any one have any ideas with what would be causing
this?
Thanks for any help,
Matt