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

Emptying textboxes

Status
Not open for further replies.

Catrina

Programmer
Feb 11, 2000
70
US
If a user types invalid data, I want to empty the textboxes for them to enter data a second time. I have tried setting .text = "" and this does nothing. Any suggestions?

Here is the code I am using (that doesn't work)

MsgBox "Client " & stClient & " already exists"
frmMain.txtClient.Text = ""
frmMain.txtCommPass.Text = ""
frmMain.txtPass = ""
Exit Sub

the code is executed, because I have stepped through it, but the boxes stil contain the invalid data, and the user has to delete it.

Thanks
Catrina



 
Try frmMain.txtClient.Text = " " (With a space between the quotes)
 
Try refreshing the text box and setting focus to it:

with frmMain.txtClient
.Text = " "
.refresh
.setfocus
end with
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top