Update record

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

After a the following code opens a second date box when
required, when I move to the next record, the box is
still open. What do I add to the code?
Any help gratefully accepted!
Thanks
Brian

Private Sub Attended_AfterUpdate()
If Attended = "Rebooked" Then
seconddate.Visible = True
ElseIf Attended = "DNA" Then
seconddate.Visible = True
Else
seconddate.Visible = False
End If
End Sub
 
After a the following code opens a second date box when
required, when I move to the next record, the box is
still open. What do I add to the code?
Any help gratefully accepted!
Thanks
Brian

Private Sub Attended_AfterUpdate()
If Attended = "Rebooked" Then
seconddate.Visible = True
ElseIf Attended = "DNA" Then
seconddate.Visible = True
Else
seconddate.Visible = False
End If
End Sub

If I understand you correctly then use the form's On Current event.
Like ...

Private Sub Form_Current()
Me.seconddate.Visible = Me.Attended = "Rebooked" Or _
Me.Attended = "DNA"
End Sub

- Jim
 
Back
Top