Link to home
Start Free TrialLog in
Avatar of 25112
25112

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of chaau
chaau
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of 25112
25112

ASKER

>>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?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 25112

ASKER

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")
Is that a question?
Avatar of 25112

ASKER

thank you for confirming