Reputation: 173
I am trying to determine the easiest way to mask the output of a specific column in a MS-Access Report.
I have a table of "contacts" that each must belong to an "organization". The contacts table was populated with legacy data, which did not rigidly enforce the relationship between contacts and organizations. On import, if a contact did not belong to an organization it was assigned to a dummy "legacy" organization (to preserve integrity, and allow us to search for and eventually back fill those values).
My problem is this - When generating a mailing list report from the contacts table the name of the dummy "legacy" organization populates for those pesky legacy contacts. I need to mask this output in such a way that all the other columns of those rows remain untouched and the organization name column is simply blank. These rows need to be included (not filtered), but if their organization == "Legacy", then on the report the organization name needs to be blank.
I have contemplated a simple VBA macro to make edits to the report once it loads, but I was wondering if there was a more straight forward mechanism. I know Access allows for input masking, does it have anything similar for outputs?
Thanks, Chris
Upvotes: 1
Views: 1080
Reputation: 91366
Why not base your report on a query?
SELECT ContactID, IIf(Company="Legacy",Null,Company)
FROM Contacts
You can also do something similar in a report control, but ensure you rename the control before you set it to a function.
Upvotes: 1