Duplicates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

OK I have a report where I will generally want to hide the duplicates, except
when it is a specific value. How would I code it so that it does not hide
dups on one value, but hides it on all others.

TIA
 
Cyberwolf said:
OK I have a report where I will generally want to hide the duplicates, except
when it is a specific value. How would I code it so that it does not hide
dups on one value, but hides it on all others.


The reliable way to hide a duplicate value is to use Sorting
and Grouping to group on the field you want to hide. Place
the field's text box (name it txtGrpDup) in the group
header. If you want to print it on the same line as the
first detail, then add this line the group header section's
Format event procedure:
Me.MoveLayout = False

To display the field in a detail text box, Copy the text box
from the group header to the detail section (and name it
txtDtlDup). Then use code in the group header section's
Format event to make one or the other text box
visible/invisible:

If Me.txtGrpDup = "specific value" Then
Me.txtGrpDup.Visible = False
Me.txtDtlDup.Visible = True
Else
Me.txtGrpDup.Visible = True
Me.txtDtlDup.Visible = False
End If
 
Back
Top