adding field to a report only sometimes

  • Thread starter Thread starter Deb
  • Start date Start date
D

Deb

Hi there....I have a report that I have created that I
want to SS number to be on ONLY if it is going to a
certian place, otherwise I want the report to leave the
SS number off. How do I create a report to do that.
RIght now I have a box set up on the form where I enter
info that says: Include SS on report (it is a check box)
If it is checked, the report should have the ss number on
it, if not checked, it should leave it off. How do I
write that on the report?
 
In the Open event of our report add code similar to the following:

If Forms!YourFormName!ckYourCheckBox Then
Me.SSNumber.Visible = True
Else
Me.SSNumber.Visible = False
End If
 
Hi there....I have a report that I have created that I
want to SS number to be on ONLY if it is going to a
certian place, otherwise I want the report to leave the
SS number off. How do I create a report to do that.
RIght now I have a box set up on the form where I enter
info that says: Include SS on report (it is a check box)
If it is checked, the report should have the ss number on
it, if not checked, it should leave it off. How do I
write that on the report?

A couple of ways:

- Base the Report on a Query with a calculated field:

ShowSS: IIF([Forms]![yourform]![chkShowSS], [SS], NULL)

- Or use the same expression as the Control Source of the textbox on
the report
 
Back
Top