control source

harps

Registered User.
Local time
Today, 09:05
Joined
Mar 10, 2010
Messages
20
i have created an invoice form based on my tblInvoice.

the fields include subtotal, vat, total in both the table and the form.
to get the form to calculate vat and subsequently the total, i built the expression in the properties of the two fields. therefore the problem is that their control source is no listed in the table. how do i do the calulation in the form to update tje appropriate fields

harps
 
Calculations are generally not stored in fields in tables. These are generated using unbound controls and user defined functions.
 
Make the calculation in the VBA.
 
the calaculationa are done in the form using the expression builder. all i want is the results to show in my invoice table. i know it is because in the properties the control source does not show as the relevant field, but as the calculation eg =[Subtotal]*0.175
 
Again I will state what DCrake said. If you are storing the parts that make up the total you should NOT, I repeat should NOT store the total in the table. It violates the rules of normalization and can jeopardize your data integrity (what if someone changes a field from outside of your form? It is no longer valid).

Use a QUERY to get the totals and you can use that query in 99.9% of the places you would use the table.
 

Users who are viewing this thread

Back
Top Bottom