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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Label Propoerties

Status
Not open for further replies.

demax182

Technical User
Jul 13, 2004
43
US
How's everybody doing? Got a quick question. I have a report used to print out order forms. I have a field called "status" which is used to tell whether the report has been revised or cancelled. I created two labels in my report, one called "REVISED" and the other "CANCELLED". Now my dilemna. I have the following code in my "on_format" event for my details section:

If Me.txtStatus.Value = "revised" then
Me.lblRevised.Visible = True
End If

And a similar code for "Me.txtStatus.Value = "cancelled""

Something like this works for a form, but it doesn't seem to work on a report? Because everything is still showing up when I put this code in. What am I doing wrong? As always, thanks in advance for all the help.

 
Hiow are ya demax182 . . . . .

We can handle this here, but for future reference the [blue]Report Guru's[/blue] hang out in the [blue]Microsoft: Access Reports Forum![/blue]

It appears [blue]status[/blue] is not in the detail section. The code should be in the same [blue]Format Event[/blue] of the section as [blue]status[/blue]. So make it so, but use the following (just better consolidation):
Code:
[blue]If Me.txtStatus.Value = "revised" then
   Me.lblRevised.Visible = True 
ElseIf Me.txtStatus.Value = "cancelled" then
   Me.lblCancelled.Visible = True
End If[/blue]

Calvin.gif
See Ya! . . . . . .
 
Thank you! I'll give it a try. I'll go to that forum for report questions from now on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top