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!

Alert of duplicate usename without losing form focus

Status
Not open for further replies.

benniesanders

Programmer
Jan 20, 2002
199
0
0
US
Greetings,

I created a registration form and I have it checking for duplication of the username after it's submitted but is there a way to let the user know without losing all the info they've already entered into the form?

Code:
SQL = "SELECT * FROM myregistration WHERE myusername = '" & Request.Form("rusername") & "'"
If objConn.Execute(SQL).EOF Then
'   Add it to the database
else
response.write "This username already exists.  Please choose another."
end if

and then have it go back to the form? Many thanks for your thoughts.
 
Please disregard. I added a "go back" thingy to my alert. Works fine. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top