Results 1 to 4 of 4

Thread: [RESOLVED] how to apply restrictions to inputs

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2009
    Posts
    36

    Resolved [RESOLVED] how to apply restrictions to inputs

    Hi, im doing a project for school and need to know how to mke restrictions on a users input (through a textbox).

    All i need to do is to make so that if the user enters a username that doesnt have the @ symbol, then an error message appears. Any help is apprecieated as always!

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: how to apply restrictions to inputs

    Do you need to do this as the user types or once they are finished?

    If once finished look at InStr function
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2009
    Posts
    36

    Re: how to apply restrictions to inputs

    Once they are finished, they fill in a username and a password then click OK to process it. Thanks, il look it up.

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: how to apply restrictions to inputs

    In the OK button's click event, you can validate the entered the text correctly. As Mazzi pointed out, using InStr() and supplying "@" as the criteria will tell you they used an @ symbol. At the same time, you can validate they entered a password and that it meets any length requirements.
    Last edited by LaVolpe; Feb 15th, 2010 at 04:35 PM. Reason: typo
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

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