PDA

Click to See Complete Forum and Search --> : How to validate entries into textboxes?


Sundaram
Dec 1st, 1999, 03:23 PM
I am new member and just began to program in VB. Can anyone help me on how to go about validating user input into texboxes which eventually will be updated into databases?

There are data of integer,date,string etc types. How to structure them at declaration before program execution? Is there any way to force users to input data in a predetermined format?

For example, I want the user to input a number in this format :123456-78-1999. How to force the textbox which is assigned to that field to accept data in that format only?

Thank you.

Manish
Dec 1st, 1999, 04:29 PM
Use validate event if u are using VB6. or can validate input just before the save method....
use markedit control to accept/display data in the required format.
u can also use keypress event to make sure that one valid characters or numbers are accepted.

minnal
Dec 1st, 1999, 04:30 PM
hi,
For validations use the Validate event of the text box which is a new feature in VB 6.0.