Formulas in MS Access
I am trying to put a calculation formula in MS Access table & form, i.e.-"total sum of," but can't get any results whatsoever. It's for monthly payment calculations.
Please help. Thank you.
Windows Forum
I am trying to put a calculation formula in MS Access table & form, i.e.-"total sum of," but can't get any results whatsoever. It's for monthly payment calculations.
Please help. Thank you.
by steved
Well, you can't use a formula in a table definition. What you can do is create a query based on the table.
If you want to use the ability of Access SQL to sum columns in the table, click on the Sigma (Totals or Sum) icon in the query design toolbar. You'll get a new row called "Total" in the query design grid. Use this to specify which fields to total.
If you want to create your own calculation function in a code module and refer to it in your query, put something like this in the "Field" row of a blank column in the query designer:
TotalPayments:MyFunction(Orders.Amount)
TotalPayments will be the name of the query column. MyFunction is the name of your function. Orders is the name of the table that the query is based on. Amount is the name of the column in Orders that you're doing the calculation on.
As for forms, you can use your query as the source for a form. You can also use a function as the source for an unbound text box (or other control) on a form.
I hope this helps.
Steve Diamond
by haign
by haign
This discussion is closed to new replies.
Sort by Trending