2 Replies - 226 Views - Last Post: 19 January 2013 - 02:22 PM Rate Topic: -----

#1 carpentierpj  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 19-January 13

Data Entry, Tabbing

Posted 19 January 2013 - 02:15 PM

Hi all,

I'm new to VB 2005, and to put it simply, this is what I'm writing:

It is a form that has 250+ combo boxes whose possible values are 0, 1, 2 and 3. The default values for all of the combo boxes is zero. I want this window to open and the focus to be on the first combo box and the zero highlighted. When either 0, 1, 2 or 3 is entered, I want the focus to jump to the next box and have the zero highlighted. Essentially, I want the user to be able to enter 1, 2, 3, 1, 3, 2... etc without having to tab.

Thanks in advance

Is This A Good Question/Topic? 0
  • +

Replies To: Data Entry, Tabbing

#2 carpentierpj  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 19-January 13

Re: Data Entry, Tabbing

Posted 19 January 2013 - 02:21 PM

To clarify, I'd like the user to only have to punch 0 through 3 269 times. How do I highlight the default value, and prior to that, how to I tab forward after a validated value (0-3)?

View Postcarpentierpj, on 19 January 2013 - 02:15 PM, said:

Hi all,

I'm new to VB 2005, and to put it simply, this is what I'm writing:

It is a form that has 250+ combo boxes whose possible values are 0, 1, 2 and 3. The default values for all of the combo boxes is zero. I want this window to open and the focus to be on the first combo box and the zero highlighted. When either 0, 1, 2 or 3 is entered, I want the focus to jump to the next box and have the zero highlighted. Essentially, I want the user to be able to enter 1, 2, 3, 1, 3, 2... etc without having to tab.

Thanks in advance

Was This Post Helpful? 0
  • +
  • -

#3 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5316
  • View blog
  • Posts: 11,357
  • Joined: 02-June 10

Re: Data Entry, Tabbing

Posted 19 January 2013 - 02:22 PM

React to the the .SelectedIndexedChanged event, then set the focus to the next control.

Since all the comboboxes are part of the Form.Controls array you could find the combobox that raised the event, then set focus to the next one.

Should be about 10 lines of code.

You can set the default value by just setting the .selectedIndex property to 0
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1