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

length 1

Status
Not open for further replies.

jass1220

Programmer
May 20, 2003
88
AE
i want to check if what the user entered in the textBox is 7 digit length before ... how i can now ?
 
i want to check if what the user entered in the textBox is 7 digit length before i save in the database ..how i can now ?
 
Hi jass1220

i) Set the MaxLength property on the text box to 7 characters.

- or -

ii) Use the Len command as follows:

Private Sub Text1_Validate(Cancel As Boolean)
If Len(Text1.Text) > 7 Then
Cancel = True
End If
End Sub

Hope this helps

David
 
thanks alot .. this what i needed


If Len(Text1.Text) < 7 Then
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top