Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Label Value Based on Parameter Query Value 1

Status
Not open for further replies.

annie52

Technical User
Mar 13, 2009
164
0
0
US
I want the value of a label on my report to change depending on the value of the [PIINType] field. For example, if the [PIINType] is "Purchase Reqn", I want the label to be:

"Estimated Award Date: " & [ContractDate]

If the [PIINType] is "Contract", I want the label to be:

"Contract Delivery Date: " & [ContractDate]

I have other values for the [PIINType] field but I only want one field to store the date.

The report runs off a paramenter query (I know, y'all hate those). I'm thinking I should be able to use a nested If, then, else statement or Select Case in the report's Open event but I cannot figure it out.

Any suggestions are deeply appreciated.
 
I would store the desired caption in the table that stores your unique PIINType values. Make sure this table is in your report's record source so you can bind the PIINTypeCaption field in your text box control source.

No code, no complex expression, just user updateable data in tables.

Duane
Hook'D on Access
MS Access MVP
 
Duane, thanks a million! I would never have thought to do that but it's perfect!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top