if stat in a report ?

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
 
F

fredg

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.
 
K

Klatuu

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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top