gbnorton
asked on
Access form text box event for constantly totalling
We have a form that records the number of wafers per container using text boxes. There are 34 of these text boxes. At the bottom of the form is a text box for the total number of wafers from the 34 text boxes. As the user enters in the number of wafers per container, we need the total number of wafers text box to update with the total quantity. Will I need to have an event for every ‘per container’ text box to update the ‘total quantity’ text box? A better way?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not sure on how your form is designed (Single form, Datasheet, Continuous,), or if it is Bound or not.
Also not clear on what the source data is.
If this were a "Normalized" design the textboxes instead would be "Rows" in a single "Field"
This way you could simply do this to get a total in the form footer:
=Sum(YourField)
Then each time you updated a value or created a record (Row), the total will update automatically.
JeffCoachman
Also not clear on what the source data is.
If this were a "Normalized" design the textboxes instead would be "Rows" in a single "Field"
This way you could simply do this to get a total in the form footer:
=Sum(YourField)
Then each time you updated a value or created a record (Row), the total will update automatically.
JeffCoachman
ASKER
Thanks!
Private Sub UpdateTotal ()
Me.txtTotalQuantity.Requer
End Sub
Private Sub TextBoxNumber25()
Call UpdateTotal
End Sub
I'm sure there are other ways...
OM Gang