ControlSource Property

G

Guest

Does anyone have a solution if you want to pass the controlsource to a
control in the detail section of a report. The help screen tells me that I
can only control the controlsouce in a groupheader. Argh... I really need to
print a particular field based on the data in another field of the same
record.

Based on the data in the Year1 field, print a particular field of that
record.

Is this possible? I can do it on the form, but not on a report. Argh, again!!
Thanks for your help
Marty
 
A

Allen Browne

Try setting the ControlSource of your text box to something like this:
=IIf([Year1] = 2005, [Field1], [Field2])

If there are lots of choices, the Switch() function might be easier than
multiple IIf()s.

Ultimlately, if you have fields named Year1, Year2, ..., it would be better
to create a related table so that your original record can have many related
records over the years.
 

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