after_Update problem

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
 
R

Rick Brandt

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top