There is no ON VISIBLE event in Access, so what you have to do is at the time you actually change the visible property of the control, then you ALSO run the code you want. For example, let's say you have a textbox and you want a button to be visible if the textbox is not null, You would put this on the textbox's AFTER UPDATE event:
Code:
Me.cmdMyButton.Visible = Not IsNull(Me.txtMyTextBox)
But then you want some other code to happen for the button, but there's no ON VISIBLE event for the button. You'll have to take care of it at the textbox's AFTER UPDATE event along with making the button visible/invisible:
Code:
If IsNull(Me.txtMyTextBox) Then
Me.cmdMyButton.Visible = False
'Run some other code here
Else
Me.cmdMyButton.Visible = True
'Run some other code here
End If
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division