Hi, I'm a coding absolute rookie and am trying to make 2 info fields visible/invisible depending on the value in a 3rd field.
The code has compiled but it's not working - is there something else I need in there?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Text99 = 1 Then
Me.[Collection Info].Visible = False
Else
Me.[Delivery Info].Visible = True
End If
If Me.Text99 = 2 Then
Me.[Collection Info].Visible = False
Else
Me.[Delivery Info].Visible = True
End If
If Me.Text99 = 3 Then
Me.[Delivery Info].Visible = False
Else
Me.[Collection Info].Visible = True
End If
End Sub
The code has compiled but it's not working - is there something else I need in there?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Text99 = 1 Then
Me.[Collection Info].Visible = False
Else
Me.[Delivery Info].Visible = True
End If
If Me.Text99 = 2 Then
Me.[Collection Info].Visible = False
Else
Me.[Delivery Info].Visible = True
End If
If Me.Text99 = 3 Then
Me.[Delivery Info].Visible = False
Else
Me.[Collection Info].Visible = True
End If
End Sub