How do you add two fields and return a message?

TxSteve

Registered User.
Local time
Today, 15:06
Joined
Dec 28, 2006
Messages
35
I know I have seen it somewhere... and yes, I am a rookie.

I have built a report that uses a sub report. My dream is to take a field from the main report section and match it against a specific field in my subreport.

(Main Report) Box A (numerical value)
(Sub Report) Box E (numberical value)
If Box A is Less then E I want a field added to say, "Failed to achieve Goal"
If Box A is equal to E, "Met Goal"
If Box A is more then E, "Exceeded Goal"
 
(Main Report) Box A (numerical value)
(Sub Report) Box E (numberical value)
If Box A is Less then E I want a field added to say, "Failed to achieve Goal"
If Box A is equal to E, "Met Goal"
If Box A is more then E, "Exceeded Goal"

the controlsource for the dynamic textbox should be

=iif(Reports!ReportName!A < Reports!ReportName!E, _
"Failed to achieve Gaol!", -
iif(Reports!ReportName!A = Reports!ReportName!E, _
"Met Gaol!", _
"Exceeded Goal")
 

Users who are viewing this thread

Back
Top Bottom