Hi Experts, I'm trying to hide textboxes but only on the New Record that the form loads up on. i.e. when I go back to a previous record using the navigation buttons on the form footer the boxes should be set to visible. Below is what I’ve tried but is not working, it keeps the boxes invisible all the time.
Set boxes invisible on load
[/CODE]
Code:
Private Sub Form_Load()
'Open the form at a new Record.
DoCmd.GoToRecord , , acNewRec
'Set Later steps to invisible on load
If Me.NewRecord = True Then
Text20.Visible = False
Text67.Visible = False
Text71.Visible = False
Command1.Visible = False
Command105.Visible = False
End If
End Sub
Navigate to another set to visible
Code:
Private Sub Form_GotFocus()
If Me.NewRecord = False Then
Text20.Visible = True
Text67.Visible = True
Text71.Visible = True
Command1.Visible = True
Command105.Visible = True
End If
End Sub
I'm sure this can't be as difficult as I’m making.
Any advice appreciated