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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using fields calculated within a report

Status
Not open for further replies.

moonbase

Programmer
Nov 18, 2002
57
GB
Is it OK to use fields calculated in a report. If I have a field with name txtDebit and a field with name txtCredit can I have a field where the control source is [txtDebit] + [txtCredit] and name txtTotal? Will Access know to calculate txtCredit and txtDebit before txtTotal?

Can txtTotal be in a different section than txtCredit and txtDebit, e.g. usding Sum?

I am having problems getting this right. Am I working on the correct lines?

 
You can use references to controls like:
=[txtDebit] + [txtCredit]
If txtTotal is a control (not a field in your report's record source) then you can't use a text box in another section with a control source of:
=Sum(txtTotal)

You can Sum fields or expressions from your report's record source. You can also set running sums on controls.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top