View Single Post
  #1  
Old January 25th, 2010, 09:41 PM posted to microsoft.public.access.forms
paradise95969
external usenet poster
 
Posts: 1
Default Running same code on many fields...

I'm using a field in the record to lock or unlock another field:

Private Sub Special_Concerns_GotFocus()
If Me.CheckEdit.Value = True Then 'true means edit is ok
Me.ActiveControl.Locked = False
Else: Me.ActiveControl.Locked = True
End If
End Sub

As you can see this is on GotFocus(). I would like to apply this to many
fields. Is there a better way to do it verses adding it to the event property
for each field separately? I'm assuming there is- but I have not figured that
out and would like to improve my design where possible.

Thanks
paradise95959