Update record

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
 
J

Jim Allensworth

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top