View Single Post
  #3  
Old January 26th, 2010, 01:05 AM posted to microsoft.public.access.forms
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Running same code on many fields...

paradise95969,

Have a look at...

http://allenbrowne.com/ser-56.html

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
"paradise95969" u57765@uwe wrote in message news:a2a8165fcc0c7@uwe...
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