In addition to what the others have told you, use the Me keyword to help
Access recognize that you're talking about a control on the form. (And if
you still have problems, rename the controls so that they're different than
the fields in the recordset. I always rename my text boxes txtNameOfField.)
Private Sub Trophy_AfterUpdate()
If Me.Check35 = True Then
Me.Trophy = Me.Full
Me.Trophy.Locked = True
Me.Trophy.Enabled = False
Else
Me.Trophy = ""
Me.Trophy.Locked = False
Me.Trophy.Enabled = True
End If
End Sub
If that still doesn't work, make sure the code is actually firing (sometimes
controls and the code for their events get separated, especially if you cut
and paste the controls to move them). Check to make sure that the
AfterUpdate property for the control has [Event Procedure] in it.
(I assume you're not getting any error message, just that the actions aren't
getting carried out. If you ARE getting an error message, what is it?)
--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no private e-mails, please)
This worked yesterday, I opened it this morning and now it
doesn't..... Is there a setting wrong?
Private Sub Trophy_AfterUpdate()
If Check35 = True Then
Trophy.Locked = True
Trophy.Enabled = False
Trophy = Full
Else
Trophy.Locked = False
Trophy.Enabled = True
Trophy = ""
End Sub- Hide quoted text -
- Show quoted text -