VB 6.0 - Validating length text entered into text box

In this tutorial, we will share about validating in VB 6.0. for this post we will share regarding Validating text entered into text box in VB 6.0

for the sample, please design like above picture
usually we already create table in database set length Product ID = 6 digits
so if we entered exceed than 6 digits is error (can not be add to database. so we must validate Length of Text
in above design form above we will validate text entered in Text1.
the code is very simple :
Sub Form_Load()
Text1.MaxLength = 6
End Sub
If you place the code and run your project. you just only entries at text1 just 6 digits
You can click here to download project / source code above

Subscribe to receive free email updates:

0 Response to "VB 6.0 - Validating length text entered into text box"

Post a Comment