Calculations in a bound text box

JeffreyDavid

Registered User.
Local time
Today, 11:34
Joined
Dec 23, 2003
Messages
63
:confused:
I have a form with some bound text boxes, 1 - Qty, 1 -PriceEach, 1 - ExtendedPrice. In my ExtendedPrice text box, I want to multiply the Qty by the PriceEach and have it display in the bound ExtendedPrice text box. If I put '=[Qty]*[PriceEach]' in the Control Source then the text box is not bound to the ExtendedPrice field, the calculation works but the text box is not bound. Should I put it in the AfterUpdate property of the PriceEach text box? Not too sure where to put the calculation code.
 
You don't store calculated fields in a table. Doing so creates a non-key dependancy which is a violation of Third Normal Form (3NF).
 
Sounds like you're basing your form on a table, too. should be based on a query. You could do the calculation in the query as an alternative to doing it in the control and bind the control to the calculated field in the query.
 
So I would just leave the ExtendedPrice as an unbound text box to display the results but not record it. So if I wanted to see the calculated ExtendedPrice again, I would just set up another calculated text box strictly for display purposes?
 

Users who are viewing this thread

Back
Top Bottom