Loop though a report (2 Viewers)

TCM1000

New member
Local time
Yesterday, 22:11
Joined
Mar 10, 2025
Messages
1
Not sure I can do this in a report so if anyone can show me how to do it will be greatly appreciated. I have a report that is a directory of club members. It has the husband and wife in the report. Some of the last names of the wives are different than the husband. I would like to loop through the report compare the last names, if the last names are the same then remove the last name of the wife and change the textbox visible to false and leave the different name alone. Thanks
 
This is easier done in a query the report is based on than the report itself as you have suggested.

You make a calculated field to display what you want for the spouses last name:

Code:
SpouseLastNameToShow: IIF(SpouseLastName = MainLastName, "", SpouseLastName)

If they are the same, show a blank, if they are different use the spouses last name.
 
on your Report, you can also do it using Conditional Formatting.
on design view of your report, click on the WifeLastName textbox.
Add conditional formatting (Ribbon->Format->Conditional Formatting).

Rule: Field Value is Equal [HusbandLastName]

set the Forecolor to White (or NoColor).

(note you need to set the Detail Alternate color to NoColor or White).
 

Users who are viewing this thread

Back
Top Bottom