I have a toggle button with a control source called active that is a yes/no field.
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:
[CODE=vb]Private Sub tglActive_After Update()
Dim strControl As String
strControl = tglActive
If strControl = Yes Then
DoCmd.SetProper ty strControl, acPropertyVisib le = True
Else
If strControl = No Then
DoCmd.SetProper ty strControl, acPropertyVisib le = False
End If
End If
End Sub[/CODE]
Any ideas?
Thanks Dan
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:
[CODE=vb]Private Sub tglActive_After Update()
Dim strControl As String
strControl = tglActive
If strControl = Yes Then
DoCmd.SetProper ty strControl, acPropertyVisib le = True
Else
If strControl = No Then
DoCmd.SetProper ty strControl, acPropertyVisib le = False
End If
End If
End Sub[/CODE]
Any ideas?
Thanks Dan
Comment