Results 1 to 3 of 3

Thread: How to validate entries into textboxes?

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 1999
    Location
    KL,WP,Malaysia
    Posts
    2

    Post

    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.

  2. #2
    Lively Member
    Join Date
    Apr 1999
    Location
    India
    Posts
    73

    Post

    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.



  3. #3
    Junior Member
    Join Date
    Nov 1999
    Location
    chennai,tamilnadu,india
    Posts
    18

    Post

    hi,
    For validations use the Validate event of the text box which is a new feature in VB 6.0.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width