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

Using the Control Source in Report Footer

Status
Not open for further replies.

Tamrak

MIS
Jan 18, 2001
213
US

Good morning

I was brain-dead on something that might look very simple. Let’s say I have the following data from a query (two fields)

Type Qty
A 3
B 10
C 50
D ..
E ..

....

My query name is: qryTest

I would like to list this information into the Report footer band. It will state something like this:

• [Qty] has type A for this period
• [Qty] will use type B
• There are [Qty] of type C reported for the case
• ...
• ....

If I use the field name in the summary band, it will give me only one result. How can I customize each field to obtain the result in the report?

I tried creating an unbound field and used control source = Qty. I tried to filter and customize to match the need and I was not successful. I believe I wrote the wrong control source. It might be something like this:

=[qryTest]![Qty][qryTest]![Type] = “A” or something like this.

Thank you for your assistant.
 
Have a look at Dlookup and Dsum. The criteria part of the arugment is where you specify the type.

Tom

Born once die twice; born twice die once.
 
I would not use Dlookup or DSum() since they would ignore report filters or where conditions.
Try expressions like:
Code:
=Sum(Abs([Type]="A") *[Qty]) & "  has  type A for this period"
=Sum(Abs([Type]="B") *[Qty]) & "  will use  type B"
="There are " & Sum(Abs([Type]="C") *[Qty]) & "  of type C reported for the case"


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