Hi, I am creating a report where under a column with a header titled people, I am pulling in information from 3 fields in my query. I have actually sized the control so that each field would come on a new line. However, occasionally one of the fields for a given record will not have data. I would like to add some sort of If statement that checks this and moves the other lines up rather than leaving a space. I tried the following which doesn't work:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me!txtFacilitator.Value > "" Then
Me!txtFacilitator.Visible = True
Else: Me!txtFacilitator.Visible = False
End If
If Me!txtBA.Text > "" Then
Me!txtBA.Visible = True
Else: Me!txtBA.Visible = False
End If
If Me!txtMedicaid.Text > "" Then
Me!txtMedicaid.Visible = True
Else: Me!txtMedicaid.Visible = False
End If
If Me!txtOther.Text > "" Then
Me!txtOther.Visible = True
Else: Me!txtOther.Visible = False
End If
End Sub
Thanks in advance for your help!
Derek Danilson
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me!txtFacilitator.Value > "" Then
Me!txtFacilitator.Visible = True
Else: Me!txtFacilitator.Visible = False
End If
If Me!txtBA.Text > "" Then
Me!txtBA.Visible = True
Else: Me!txtBA.Visible = False
End If
If Me!txtMedicaid.Text > "" Then
Me!txtMedicaid.Visible = True
Else: Me!txtMedicaid.Visible = False
End If
If Me!txtOther.Text > "" Then
Me!txtOther.Visible = True
Else: Me!txtOther.Visible = False
End If
End Sub
Thanks in advance for your help!
Derek Danilson