Link to home
Start Free TrialLog in
Avatar of Patrick O'Dea
Patrick O'DeaFlag for Ireland

asked on

Access Report - Make label invisible (if ..)

Hi,

I have a database than monitors the fixing of cars.

I have a "job" form that has an BUTTON to print a single page "jobsheet".

The "CallOutCharge" prints on the jobsheet (using qryJobSheet)

However, if the "CallOutCharge" is zero then the report label called "label999" should NOT print (or be invisible).

How do I make "label999" NOT print.
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Add VBA to the Format event of the detail section (or whatever section the label is in):


Me.Label999.visible = (Me.CallOutCharge <> 0)

Open in new window

Alternatively, use a textbox for this instead of a label and use conditional formatting.

Select Expression Is from the drop-down and place this in the expression entry box:

[CallOutCharge] = 0

Open in new window


and set the text and background formatting to make the textbox blend in with the paper (eg: all white)
Avatar of Patrick O'Dea

ASKER

Thanks mbizup,

Option A worked well.

I note that when I change to "CallOutCharge" on the main form - The report prints the ORIGINAL (unchanged) value.

However, If I exit the form and re-enter and THEN print - All is well!

Why?
Sorry mbizup,

I had intended to put my last response (above) as a separate question.

Would this be a better way to go?
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great, that's fixed it!