How can I write code who will hide check box in a form after confirmed.
hide check box in form
Collapse
X
-
You need to create an after update event on the checkbox control.
If your checkbox name was check1 then ...
[code=vb]
Private Sub check1_AfterUpd ate()
If Me!check1 = -1 Then
' move focus to the next control on the form
Me!ctlName.SetF ocus
Me!check1.Visib le = False
Else
Me!ctlName.SetF ocus
Me!check1.Visib le = True
End If
End Sub
' The following code would also need to be placed in the On Current event of the form.
Private Sub Form_OnCurrent( )
If Me!check1 = -1 Then
' move focus to the next control on the form
Me!check1.Visib le = False
Else
Me!check1.Visib le = True
End If
End Sub
[/code]
Comment