Hi
I am working on a database in which I am trying to write some code which displays a command button dependant on another action.
In my example, I have two check boxes which I have set up to allow only one choice. So when you check one, the other becomes unchecked!
Behind both these check boxes I have managed to write the code which does make the command button visible/invisible depending on which check box is checked. See bellow
Private Sub ChangeOnly_Click()
Me.ChangeAndImpact = Disable
If Me.ChangeAndImpact = "0" Then Forms!SChangeContactDetails!SChangeRecommendations !Button.Visible = True
End Sub
Private Sub ChangeAndImpact_Click()
Me.ChangeOnly = Disable
If Me.ChangeAndImpact = "-1" Then Forms!SChangeContactDetails!SChangeRecommendations !Button.Visible = False
End Sub
However, the crucial bit I am missing is that it does the same response for ever record. So if I want it invisible in one record thats fine,but then if you go to the next record where you want it to be visible, and have checked the correct box for this to happen, it is still invisible.
What I need is some additional coding which ties it to the current record?
Advice, as always, gratefully received!
bagpuss