On my form I put a rectangle colored red with a label with the words Inactive on it.
My toggle button says Active on the button. I have placed the button on top of the rectangle. I want to make the button be invisible when it is toggled off and visible when toggled on. So far I have the following but it is not working:
Expand|Select|Wrap|Line Numbers
- Private Sub tglActive_AfterUpdate()
- Dim strControl As String
- strControl = tglActive
- If strControl = Yes Then
- DoCmd.SetProperty strControl, acPropertyVisible = True
- Else
- If strControl = No Then
- DoCmd.SetProperty strControl, acPropertyVisible = False
- End If
- End If
- End Sub
Thanks Dan