Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Global Loast Focus

Status
Not open for further replies.

Vec

IS-IT--Management
Jan 29, 2002
418
0
0
US
Is there a way to make a "Global" Lost Focus event?

I want to use Data1.Refresh for every single object on the form without having to place it in each one.

-
radium.gif

Looking Toward The Future
 
Use this routine to pass controls and editing them.

Public Sub ChangeToCapital(ThisText As Textbox)
'This sub will change whatever text box is passed
'to it.
ThisText.Text = UCase(ThisText.Text)
End Sub

Private Sub Text1_LostFocus()

'Pass this text box name to the global procedure
'called ChangeToCapital
ChangeToCapital Text1
End Sub

Private Sub Text2_LostFocus()
'Pass this text box name to the global procedure
'called ChangeToCapital
ChangeToCapital Text2

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top