Ydbc -
Your best bet would be to put this code in a public subroutine, accepting
Value as a parameter, and then call it from all the control events you want.
That way if you need to change the code, you will only need to change it one
place instead of every place.
Another option is if these are all AfterUpdate events on bound controls, you
can do the same with the form AfterUpdate event.
--
Daryl S
"ydbc" wrote:
> Hi,
>
> I am buliding a form with multiple controls on it.
>
> I need to assign the same Event Procdure to a number of controls within hte
> form.
>
> This is what I have so far:
>
> Private Sub Text53_AfterUpdate()
> Dim ctlCurrentControl As Control
> Dim Value
> Set ctlCurrentControl = Screen.ActiveControl
> strControlName = ctlCurrentControl.Name
>
> Value = ctlCurrentControl
> Select Case Value
> Case 2.1 To 2.3
> Me.Text65 = "2a"
> Case 3.1 To 3.3
> Me.Text65 = "3a"
> End Select
> End Sub
>
> I would like to substitute the "Text53_AfterUpdate()" with whatever control
> I'm on at the time.
>
> Any suggestions would me appreciated.
>
> Thanks
> --
> ydbc
|