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

Help!!

Status
Not open for further replies.

sabrina

Programmer
Apr 24, 2000
2
0
0
PK
i want to make a form in Vb Script..<br>i want to make a text field where only integer can write,if any body try to wite the integer it gives&nbsp;&nbsp;window..<br>plz help me out..<br>i can't do this..<br>tell me bout validification also..
 
Hi Sabrina,<br><br>Could you give your questions a more descriptive title please? &lt;grin&gt;<br><br>Anyway.<br><br>You need to look at the KeyPress event which is defined for a text box as:<br><br>&quot;Private Sub Text1_KeyPress(KeyAscii As Integer)&quot;<br><br>This event is fired each time the user presses a key when that control has focus - as you would expect from the name.<br><br>The parameter, KeyAscii, holds the ascii number of the key that's been pressed - if you don't like what has been pressed you can set it to zero which rejects the keystroke.<br><br>Mike<br> <p>Mike Lacey<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top