I am using an adaptation of some code on 4 Guys that will verify that a username contains only letters, numbers, hypens, and underscores. However, I can&#039;t seem to get it to work. It pops up the error message even if I have permissable data in the field. Here is my code:<BR><BR>Dim iStrPos, iLoop, strCurrentChar, bolValidString, ErrorMsg<BR> For iLoop = 1 to Len(Username)<BR> strCurrentChar = Mid(Username, iLoop, 1)<BR> If strCurrentChar = "_" _<BR> or strCurrentChar = "-" _<BR> or isNumeric(strCurrentChar) _<BR> or (Asc(UCase(strCurrentChar)) &#062;= Asc("A") and _<BR> Asc(UCase(strCurrentChar)) &#060;= Asc("Z")) _ <BR> Then <BR> Else<BR> bolValidString = False<BR> End If<BR> <BR> Next<BR> <BR> If Not bolValidString Then<BR> ErrorMsg = ErrorMsg & "Invalid Username"<BR> End If<BR><BR>P.S. The article link is here:<BR><BR>http://www.4guysfromrolla.com/webtech/073199-1.2.shtml