PDA

Click to See Complete Forum and Search --> : Validation Checking


VB_Novice
Mar 30th, 2000, 02:01 AM
Hello,

I am desperately trying to get a validation check working to validate text that is entered into a text box, before being passed into a database.

The problem is I have to check that a code being entered into the text box comprises of the following:

three letters then
three numbers then
one letter then
one number

(ie) aaa222b3

I have tried various if statements etc.. to get around this and I would be grateful if anyone out there would know of any code that would enable this validation check...

Thanks,
Andrew

Forest Dragon
Mar 30th, 2000, 06:03 PM
You can write a loop to check the TextBox's value character by character and do the appropriate checking for every character by using the IsNumeric function (for numbers) or the Chr function (for letters).

Good Luck!!!