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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear a text box's text on got focus

Status
Not open for further replies.

Krash878

Programmer
May 8, 2001
172
0
0
US
What would be the code to do this?

I have a text box whose default value is "*" and when it gets focus I want the text box to clear.

Thanks

Krash
 
Private Sub Textbox_GotFocus()
Textbox= ""
End Sub

Hope that this helps you...
 
Private Sub txtYourField_GotFocus()

Me.txtYourField.Value = ""

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top