Automatic Text in Report

J

Jennifer

I have a report where I've got a text box that could be
one of two values that it pulls from a query. I'd like to
make another box that changes based on what appears in the
text box.

If the text box reads "Project Management Board Meeting"
then the second box would read "Meeting was held to
discuss the list of current project proposals with the
Project Management Board and receive direction concerning
which proposals should be elevated to project status and
funded."
If the text box reads "Project Progress Meeting" then the
second box would read "Meeting was held to discuss the
status of current projects."

Is there a way to do this in the report? Should I make
another field in my table? Can a query do this?

I would also like to ask if there is a way to hide the
label of a text box if there is no text in it. I've got
the text box set to Can Shrink, but the label still
appears when the box is empty.

Thank you,

Jennifer
 
F

fredg

I have a report where I've got a text box that could be
one of two values that it pulls from a query. I'd like to
make another box that changes based on what appears in the
text box.

If the text box reads "Project Management Board Meeting"
then the second box would read "Meeting was held to
discuss the list of current project proposals with the
Project Management Board and receive direction concerning
which proposals should be elevated to project status and
funded."
If the text box reads "Project Progress Meeting" then the
second box would read "Meeting was held to discuss the
status of current projects."

Is there a way to do this in the report? Should I make
another field in my table? Can a query do this?

I would also like to ask if there is a way to hide the
label of a text box if there is no text in it. I've got
the text box set to Can Shrink, but the label still
appears when the box is empty.

Thank you,

Jennifer

One way:
Add an unbound control to the report.
Set it's Control Source to:

= IIf([ControlA] = "Project Management Board Meeting" ,"Meeting was
held to discuss the list of current project proposals with the Project
Management Board and receive direction concerning which proposals
should be elevated to project status and funded.","Meeting was held
to discuss the status of current projects.")

Another way:
Have 2 labels, one with each message, placed one directly on top of
the other.
Then code the Detail Section format event:

LabelA.Visible = [ControlA] = "Project Management Board Meeting"
LabelB.Visible = Not [ControlA] = "Project Management Board Meeting"
 
F

Fons Ponsioen

Hi Jennifer.
Yes you can.
-----Original Message-----
I have a report where I've got a text box that could be
one of two values that it pulls from a query. I'd like to
make another box that changes based on what appears in the
text box.
If the text box reads "Project Management Board Meeting"
then the second box would read "Meeting was held to
discuss the list of current project proposals with the
Project Management Board and receive direction concerning
which proposals should be elevated to project status and
funded."
If the text box reads "Project Progress Meeting" then the
second box would read "Meeting was held to discuss the
status of current projects."
Is there a way to do this in the report?
In the report in design view place an unbound textbox, in
the source for this textbox type:
=IIF([YourData1]= "Project Management Board
Meeting","Meeting was held to discuss the list of current
project proposals with the Project Management Board and
receive direction concerning which proposals should be
elevated to project status and funded.",IIF ([YourData1]
= "Project Management Board Meeting","Meeting was held to
discuss the list of current project proposals with the
Project Management Board and receive direction concerning
which proposals should be elevated to project status and
funded.","No Comment"))
All of the above from the = through the )) is on one line.
Should I make another field in my table? Can a query do
this? you could also place the same IIF in a query and
just skip the =.
I would also like to ask if there is a way to hide the
label of a text box if there is no text in it. I've got
the text box set to Can Shrink, but the label still
appears when the box is empty.
Change the label to a textbox, and use a similar IIF
statement, like:
=IIF([YourData] is null,"","Your Label")
now you can set the can shrink for this textbox to can
shrink and set the report band property can shrink to yes
to hide the blank line.

Hope this helps.
Fons
 

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