I have a check box where if it is checked the following text box is visible for data entry. Here is the code:
Private Sub Form_Current()
If Me.COMPONENT.Value = "Yes" Then
Me.EXISTING_TAG.Visible = Me.COMPONENT
Else
Me.EXISTING_TAG.Visible = False
End If
End Sub
Private Sub COMPONENT_AfterUpdate()
Me.EXISTING_TAG.Visible = Me.COMPONENT
Me.EXISTING_TAG.SetFocus
End Sub
This works fine until the box is unchecked and then it has an issue with the SetFocus because the box is no longer visible.
How can I fix this?
Also after the SetFocus I want to make entry required in the EXISTING_TAG txt box if the COMPONET box is checked?
Any help is greatly appreciated, thanks!