Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

storing calculated fields

Status
Not open for further replies.

toffa

Programmer
Aug 24, 2004
77
AU
is it possible to store the number that is calculated in a feild.

I have a form and a subform, the form is a typical invoice style with id bill to subtotal, tax, total

the subtotal comes from the subform where i have a calculation in te footer.

so the subtotal is =[invoicesub]!total
the tax is =[subtotal]*0.1
and total is =[subtotal]+[gst]

what i wanted to do is store these figures in a table. At the moment the form id, bill to and date are getting stored fine but i really wanted the toatls for an invoice report.
Chris
 
toffa
It is possible to store the Total, but you don't need to store calculated fields as they can always be obtained in queries that populate your reports.

I don't know how your tables are designed, but if there can be several items in an invoice you need an Invoice table to hold the CustomerID and information about that customer, then an Invoice Details table to hold the individual invoice details that relate to each customer.

Your Invoice form would then have a subform for Invoice Details and GST calculations etc. Your Invoice report would have a subreport for Invoice Details and GST calculations etc.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top