×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

on selection from combo in grid, move to next cell automatically

on selection from combo in grid, move to next cell automatically

on selection from combo in grid, move to next cell automatically

(OP)
Hi Team!

I have a combo box in a grid. The rowsource is a cursor generated in 'When' method through a SELECT statement. I want to move to the next column, ie next cell in same row, when user selects a value from the Combo. But now, after selection control stays with the Combo and I have to press Enter to move to the next column.

Is there any way to move control to next column upon selection form the Combo box?

I tried setting 'SET CONFIRM OFF' but it doesn't have any effect.
May be a 'KEYBOARD {ENTER}' will work, but I am a bit reluctant to use KEYBOARD command as I have to then ensure that it is taken off from the memory that it doesn't go in for another control unexpectedly.
Any straight forward method?

Thanks in advance,
Rajesh

RE: on selection from combo in grid, move to next cell automatically

KEYBOARD is an option, {TAB] is usually used to go to the next control.
And you can use this.column2.text1.SetFocus()

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: on selection from combo in grid, move to next cell automatically

(OP)
Hi Olaf,
Let me try that {TAB}.
Thanks.

RE: on selection from combo in grid, move to next cell automatically

I forgot to mention you can RETURN 1 in the valid event, too. Or the control you want to set focus to, so RETURN THIS.PARENT.COLUMN2 from grid.COLUMN1.COMBOBOX1.VALID() event. Columns have a Setfocus method and will then automatically forward the focus to their currentcontrol (or dynamiccurrentcontrol), so that's also generally working.

But indeed Return 1 or KEYBOARD '{TAB}' also are most generally correct, as they automatically take into account when controls have set Tabstop=.f., you focus the next control in tab order and respect their tabstop setting.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: on selection from combo in grid, move to next cell automatically

(OP)
Hi Olaf,
Thank you for the explanation. I got that "when controls have set Tabstop=.f." scenario!
Rajesh

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close