Results 1 to 3 of 3

Thread: How to tab automaically

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    Glasgow
    Posts
    5
    Hi their,

    I am developing a VB application and I have restricted length of fields as well. For example I am using customer number whose length is 7 and I have specified the maxlength to 7 as well.

    Is it possible one I have entered the 7th digit it can tab automatically to next field.

    Many thanks in advance.

    Saqi
    Visual Basic 6.0 Enterprise Edition

    saqi_the_angel

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    Yep, in the change event of the text box, detect how many charcters have been typed in. If it is 7 then set the foucs to the next box.

    Code:
    Private Sub Text1_Change()
      if Len(text1.text) >= 7 then
        text2.setfocus
      end if
    end sub
    Iain, thats with an i by the way!

  3. #3
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    I'm sorry I didn't mean to be affendent I only showed an other solution.

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