Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    82

    Unanswered: Setting a certain amount of numbers

    All i ask is a way to make the program enable a button if a certain amout numbers are inserted into a textbox:

    Private Sub cmdSubmit_click()

    if txtbox1.text_______________ then
    cmdSubmit.enabled = true
    end if
    end sub

    all i want is the _____________ filled in or if its more complicated please fix my code. It seems simple but then again difficult because I have a limited knowledge of the code.


    Thanks for any help

    JWman

  2. #2
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346
    Put this code in the KeyPress event of the textbox:

    Code:
    if len(txtbox1.text)=5 then
    cmdSubmit.enabled = true
    end if
    http://www.scirocco.ca/images/banner...occobanner.gif

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

  3. #3
    Join Date
    Aug 2004
    Posts
    82
    Thanks for that.

  4. #4
    Join Date
    Oct 2004
    Location
    South Houston Tx.
    Posts
    6
    wow im glad ur here... i was about to tell him a much more complicated way to do it that I know works using "mod" math. now I can use that to simplify my progs.

Posting Permissions

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