DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Chris Guest

    Text box text manipulation


    I have text box where the user enters a 3 digit number I would like to take
    the 1st number and sepearte it from the last 2 numbers, so that i can use
    them for different parts of my where clause in the query i am running

  2. #2
    Colin McGuigan Guest

    Re: Text box text manipulation

    Chris wrote in message <38e3898f$1@news.devx.com>...
    >
    >I have text box where the user enters a 3 digit number I would like to take
    >the 1st number and sepearte it from the last 2 numbers, so that i can use
    >them for different parts of my where clause in the query i am running


    Check out the Mid() function:

    First number: Mid(txtText.Text, 1, 1)
    Second and third numbers: Mid(txtText.Text, 2, 2)

    --
    Colin McGuigan




  3. #3
    Joe Bissey Guest

    Re: Text box text manipulation


    "Chris" <c_unique@msn.com> wrote:
    >
    >I have text box where the user enters a 3 digit number I would like to take
    >the 1st number and sepearte it from the last 2 numbers, so that i can use
    >them for different parts of my where clause in the query i am running


    Chris,

    You could try using a mid$ function.I would also assign variables to the
    values being passed to the query. for instance

    Dim r,s as String
    stext(this is the text box)

    r=mid$(stext.text,1,1)
    s=Mid$(stext.text,2,2)

    You can then pass variables r and s to your query. I am using my sense of
    logic and have not tried this out, but it should work.
    If you try it and it works, let me know

    Joe


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links