General discussion

Locked

Formulas in MS Access

By haign ·
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.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Formulas in MS Access

by SteveD In reply to Formulas in MS Access

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

Collapse -

Formulas in MS Access

by haign In reply to Formulas in MS Access

It worked. Thank you!

Collapse -

Formulas in MS Access

by haign In reply to Formulas in MS Access

This question was closed by the author

Back to Windows Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums