- Total Members: 220,034
- Threads: 525,390
- Posts: 977,005
-
February 9th, 2013, 04:45 PM
#1
Validation Rule for TextBox
This is my first post here so Hi everyone.
I am new to VB and I am creating program that calculate the area of the room and calculate the price of the paint etc. One of the restriction is that the height of the room must be between 2 and 6 and the length must be between 1 and 25. I have two text boxes, one for hight and one for length. I need to add validation rule for both of them. I tried few codes but none of the worked for me. I was still able to calculate any number.
Thanks
Dzak
-
February 9th, 2013, 09:48 PM
#2
I forgot to add that I am using Windows Forms Application (I am not sure if it does matter or not).
-
February 25th, 2013, 11:54 AM
#3
Validation rules are generally set at the table level of a database design. However, you are using a smart form that will only use the variables for a temporary time, the time needed to perform your calculation. On the forms properties section for each of the controls, be sure that you can enter integer values. Look for a validation field to enter your min and max values. DO NOT use double quotes when assigning the int values. Should look something like this:
Validation Rule: >=2 AND <=6
Or
Between 2 AND 6.
Too many different ways to handle this validation. OPEN AN
Similar Threads
-
By udita in forum Microsoft Access Help
Replies: 1
Last Post: August 6th, 2009, 12:48 PM
-
By KeiFeR123 in forum Microsoft Access Help
Replies: 1
Last Post: October 3rd, 2004, 09:53 PM
-
By x_c4_4u in forum Visual Basic Programming
Replies: 3
Last Post: September 13th, 2004, 02:14 AM
-
By canadian in forum Microsoft Access Help
Replies: 1
Last Post: June 9th, 2004, 10:47 AM
-
By raeleong in forum Microsoft Access Help
Replies: 3
Last Post: May 14th, 2004, 01:35 AM