Hide duplicate label

  • Thread starter Thread starter linda
  • Start date Start date
L

linda

I am working on a report and want to hide the label for a
fax number if the number is a duplicate. I have written
the code (below)to hide the label for the cell# and the
fax# if it is null. Is there anyway to just add a couple
of lines of code to hide the label if the cell is a
duplicate?

Thanks,
Linda

Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)

Dim blnCell As Boolean
Dim blnFax As Boolean

blnCell = Not IsNull(user_cell)
blnFax = Not IsNull(user_fax)

user_cell_Label.Visible = blnCell
user_fax_Label.Visible = blnFax

End Sub
 
Is a duplicate of what? If it's just another field in the same record

If Me.txtFax = Me.txtOthertextbox Then
Me.txtFaxLabel.Visible = False
Else
Me.txtFaxLabel.Visible = True
End If
 
The report is a list of employees and their location:

Location
Employee1 name
phone 555.555.5555
fax 555.555.1234 (first)
Employee2 name
phone 555.555.4321
fax 555.555.1234 (duplicate-hidden)

I only need the fax listed once per location, so I set the
fax field to hide duplicates; however, I still need to
hide the fax label if the duplicate fax number is hidden.

Thanks,
Linda
 
The label should be hidden also unless it has become detached from the
textbox. If so, to reattach it, select the label and press Ctrl+X. Next,
select the textbox and press Ctrl+C. This should reattach the label to the
textbox so that it will be hidden when the textbox is hidden.
 
Back
Top