G
Guest
I have a field, named "LastName" on a form. The After_Update is set to the
following: (it basically removes from view certain fields which don't need to
be filled in, depending upon whether "Conference" is entered in the LastName
field, or "Break," "Lunch" or "Fine!")
Private Sub LastName_AfterUpdate()
If Me.LastName = "Conference" Then
Me.Level.Visible = False
Me.FirstName.Visible = False
Me.Combo178.Visible = False
Me.Box219.Visible = False
Me.Label180.Visible = False
Me.Honors.Visible = False
Me.ExamType = "Conf"
Else: Me.Level.Visible = True
Me.FirstName.Visible = True
Me.Combo178.Visible = True
Me.Box219.Visible = True
Me.Label180.Visible = True
Me.Honors.Visible = True
End If
If Me.LastName = "Break" Or Me.LastName = "Lunch" Or Me.LastName =
"Fine!" Then
Me.Level.Visible = False
Me.FirstName.Visible = False
Me.Combo178.Visible = False
Me.Box219.Visible = False
Me.Label180.Visible = False
Me.Honors.Visible = False
Me.ExamType.Visible = False
Me.Fee.Visible = False
Else: Me.Level.Visible = True
Me.FirstName.Visible = True
Me.Combo178.Visible = True
Me.Box219.Visible = True
Me.Label180.Visible = True
Me.Honors.Visible = True
Me.ExamType.Visible = True
Me.Fee.Visible = True
End If
End Sub
Interestingly, the behavior is working properly, but only if "Break",
"Lunch" or "Fine!" is entered in the last name field. It seems to be
bypassing the opening If...Then routine.
What did I miss?
Thanks in advance.
Jerry
following: (it basically removes from view certain fields which don't need to
be filled in, depending upon whether "Conference" is entered in the LastName
field, or "Break," "Lunch" or "Fine!")
Private Sub LastName_AfterUpdate()
If Me.LastName = "Conference" Then
Me.Level.Visible = False
Me.FirstName.Visible = False
Me.Combo178.Visible = False
Me.Box219.Visible = False
Me.Label180.Visible = False
Me.Honors.Visible = False
Me.ExamType = "Conf"
Else: Me.Level.Visible = True
Me.FirstName.Visible = True
Me.Combo178.Visible = True
Me.Box219.Visible = True
Me.Label180.Visible = True
Me.Honors.Visible = True
End If
If Me.LastName = "Break" Or Me.LastName = "Lunch" Or Me.LastName =
"Fine!" Then
Me.Level.Visible = False
Me.FirstName.Visible = False
Me.Combo178.Visible = False
Me.Box219.Visible = False
Me.Label180.Visible = False
Me.Honors.Visible = False
Me.ExamType.Visible = False
Me.Fee.Visible = False
Else: Me.Level.Visible = True
Me.FirstName.Visible = True
Me.Combo178.Visible = True
Me.Box219.Visible = True
Me.Label180.Visible = True
Me.Honors.Visible = True
Me.ExamType.Visible = True
Me.Fee.Visible = True
End If
End Sub
Interestingly, the behavior is working properly, but only if "Break",
"Lunch" or "Fine!" is entered in the last name field. It seems to be
bypassing the opening If...Then routine.
What did I miss?
Thanks in advance.
Jerry