Hello:
I three fields on a continuous form:
[GWP], [NWP] & [Binding_Percent age]
On the same form I have an unbound text box [Sum50NWP] with the following formula in the control source:
[code=vb] =Sum(IIf([Binding_Percent age]=50,[NWP],0)) [/code]
This worked great.
Now I am being requested that my user does not want an End User to input a number into the [NWP] field but rather have it be calculated on the form. You see, it has been brought to light that [NWP] is equal to [GWP] – [Ceded] ([Ceded] would be a new field for my table). Since I have heard that you never want to store a value that is dependent on other fields, I eliminated my [NWP] field from my table added [Ceded] and then in the form I added an unbound text box called [NWP_Calc]. In the control source I have the following Vb:
[code=vb] =[tblAllForecast! GWP]-[tblAllForecast! Ceded] [/code]
This works great. I modified my [Sum50NWP] with the following formula in the control source:
[code=vb] =Sum(IIf([Binding_Percent age]=50,[Forms!Forecast! NWP_Calc],0)) [/code]
but now I am getting a “#Error” in my [Sum50NWP].
Any ideas what I missed?
Thanks,
Keith.
I three fields on a continuous form:
[GWP], [NWP] & [Binding_Percent age]
On the same form I have an unbound text box [Sum50NWP] with the following formula in the control source:
[code=vb] =Sum(IIf([Binding_Percent age]=50,[NWP],0)) [/code]
This worked great.
Now I am being requested that my user does not want an End User to input a number into the [NWP] field but rather have it be calculated on the form. You see, it has been brought to light that [NWP] is equal to [GWP] – [Ceded] ([Ceded] would be a new field for my table). Since I have heard that you never want to store a value that is dependent on other fields, I eliminated my [NWP] field from my table added [Ceded] and then in the form I added an unbound text box called [NWP_Calc]. In the control source I have the following Vb:
[code=vb] =[tblAllForecast! GWP]-[tblAllForecast! Ceded] [/code]
This works great. I modified my [Sum50NWP] with the following formula in the control source:
[code=vb] =Sum(IIf([Binding_Percent age]=50,[Forms!Forecast! NWP_Calc],0)) [/code]
but now I am getting a “#Error” in my [Sum50NWP].
Any ideas what I missed?
Thanks,
Keith.
Comment