We help IT Professionals succeed at work.

control to hold a single value in a report. (access 2002)

25112
25112 asked
on
102 Views
Last Modified: 2017-03-30
please see attached..
what will be the right control to place where the marked green box is.

the query in the 'REPORT' whose property is highlighted is as below (simplified, leaving out the complex conditions)
SELECT field1, Field2, Field3,Field4
FROM Book_Table
WHERE Condition1 AND condition2
ORDER BY Field2 DESC;

The new field to introduce below the above 'REPORT' control, would be of the below format:
SELECT avg(Field3)
FROM Book_Table
WHERE Condition1 AND condition2
heaader.png
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2013
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
what will be the right control to place where the marked green box is.
Usage of controls is not arbitrary.  What do you want to see in the control?  It looks to me like you probably want another subreport.

Author

Commented:
>>What do you want to see in the control?
The new one will be an average.. so a single value.
the existing report (3 next to each other ) is a 3 column list..

if it is a single value, do you recommend subreport for any value/reason?
CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
the report source is a QUERY with
SELECT field1, Field2, Field3,Field4
 FROM Book_Table
 WHERE Condition1 AND condition2
 ORDER BY Field2 DESC;

for
SELECT avg(Field3)
 FROM Book_Table
 WHERE Condition1 AND condition2
in txt box, you mentioned: DAvg instead of avg. is that for specific reason?

so, will be it format like:
DAvg("Field3", "Book_Table", "Column1=1 AND Column2=2")
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
Is that a question?

Author

Commented:
thank you for confirming