liberty crown
asked on
Is there a way to sum up the values of textboxes that are not visible by default
Hi Experts. I have three textboxes which only show when a button is checked then subsequently the values in the text boxes are summed up. My existing solution is returning empty using ![Bill] = Nz((Me.txtPharmAmt1 + Me.txtPharmAmt2+ Me.txtPharmAmt3), 0).
You might want to just do that in the Query which is the RowSource of your form, rather than including a field in the table that can be computed from other values in the table.
The disadvantage of doing what you are doing is that if someone makes a change to the PharmAmt1, PharmAmt2, or PharmAme3 column while working in a table, the [Bill] field will not get updated. Another alternative, would be to make [Bill] a computed field in the table design so that no matter where those other values are changed, table, query, form, the [Bill] amount would automatically be recalculated.
The disadvantage of doing what you are doing is that if someone makes a change to the PharmAmt1, PharmAmt2, or PharmAme3 column while working in a table, the [Bill] field will not get updated. Another alternative, would be to make [Bill] a computed field in the table design so that no matter where those other values are changed, table, query, form, the [Bill] amount would automatically be recalculated.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Open in new window
It shouldn't matter whether the control is visible or not.