Results 1 to 4 of 4

Thread: tab order

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Location
    suburb of cleveland
    Posts
    72

    tab order

    hello all
    i am just getting started with vb and cant figure out how to have the enter key change the tab order i have to enter data and then click on next data box with mouse there must be a better way
    thanks john

  2. #2
    Fanatic Member LITHIA's Avatar
    Join Date
    Dec 2002
    Location
    UK, England
    Posts
    575
    hmm... just wondering, why aren't you using the tab key to go through the boxes? would make a lot more sense than having to write code to make it work with the enter key instead...

    is there a reason why you aren't using the tab key? is there a problem with it or something?

    if you aren't sure, the TAB key will cycle through the tab order... sorry if i'm insulting your intelligence but i really dunno why you are needing to use the enter key...

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Location
    suburb of cleveland
    Posts
    72

    reply

    hello lithia

    the tab key does work, i just thought once i enter data the enter key should then work, also i have the following code

    if txtname.text="" then
    else: messagebox.show("enter name")
    end if

    it doesnt seem to work properly the messagebox shows but it doesnt seem to let me enter a whole name but the messagebox shows at every keystroke what am i missing

    thanks john
    acutualy i need to check for a specicif username and password

    thanks john

  4. #4
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416

    Re: reply

    Originally posted by jwisneski
    hello lithia

    the tab key does work, i just thought once i enter data the enter key should then work, also i have the following code

    if txtname.text="" then
    else: messagebox.show("enter name")
    end if

    it doesnt seem to work properly the messagebox shows but it doesnt seem to let me enter a whole name but the messagebox shows at every keystroke what am i missing

    thanks john
    acutualy i need to check for a specicif username and password

    thanks john
    VB Code:
    1. 'put it in keydown event of the textbox.
    2. keypreview = true
    3. 'in keydown event
    4. if e.keycode = keys.enter then
    5.    if txtname.text = "" then
    6.        messagebox.show("you must enter your name")
    7.    end if
    8. end if

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