after_Update problem

  • Thread starter Thread starter David Mc
  • Start date Start date
D

David Mc

With every text box and memo box i have to use code
similar to the following, is there an easier way (i have
about twenty objects on each screen!)

Private Sub txtAddress_1_AfterUpdate()
Me!txtAddress_1 = StrConv(Me!txtAddress_1,
vbProperCase)
End Sub

Thanks

David
 
David Mc said:
With every text box and memo box i have to use code
similar to the following, is there an easier way (i have
about twenty objects on each screen!)

Private Sub txtAddress_1_AfterUpdate()
Me!txtAddress_1 = StrConv(Me!txtAddress_1,
vbProperCase)
End Sub

Change the code to a function.

Function YourFunctionName()
Me.ActiveControl = StrConv(Me!ActiveControl, vbProperCase)
End Function


Then you can select all 20 controls at once and just type. . .

=YourFunctionName()

.. . .in the AfterUpdate event property.
 
Back
Top