if stat in a report ?

  • Thread starter Thread starter blake7
  • Start date Start date
B

blake7

Hi all, I have a text box on a report called
"repeatIssue" with the following code which is looking at a CHECK BOX
called "Issue" on a form.

if[forms]![correctiveaction]![Issue] = true then
me.repeatissue = "Yes"
else
me.repeatissue = "No"
end if

Question - is the context of the code correct for a text box on a report?,
it will not work the text box on the report just remains blank! am I doing
something wrong?, Regards Tony
 
Hi all, I have a text box on a report called
"repeatIssue" with the following code which is looking at a CHECK BOX
called "Issue" on a form.

if[forms]![correctiveaction]![Issue] = true then
me.repeatissue = "Yes"
else
me.repeatissue = "No"
end if

Question - is the context of the code correct for a text box on a report?,
it will not work the text box on the report just remains blank! am I doing
something wrong?, Regards Tony

You left out the most important parts.
1) Is the form [correctiveaction] Open when the report is run?
2) What Report event did you place the code in?
3) Is repeatissue the name of an UNBOUND control in the report?
If so, what section is it in?

Let's assume repeatissue is the name of an unbound control in the
report's Detail section.
Place your above code in the Detail Format event.

The form MUST still be open when the report is run.
 
I don't know where you put the code, but you really don't need it.
You can use the control source of the repeatIssue text box to display the
value you want:
=Iif([forms]![correctiveaction]![Issue], "Yes", "No")
 
Back
Top