best event for update code?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • STeve Lefevre

    #1

    best event for update code?

    Hey folks -

    I'm working on a form. The form is in datasheet view. There are two
    fields of concern: "Score" and "Answer".

    I'm having problems getting the behavior I want out of it.
    Score and Answer are both drop downs. Only Score has a tab stop.
    Normally, the user will type in a single number for the Score, 0-9. It
    should then update Answer based on the score, and move the cursor to the
    Score field the next row down. All this on a single number keystroke.
    The idea is that they can fly through the whole form by pressing only
    number keys.

    The problem is, I can't figure out which event to base this updating
    code on. Keypress events screw stuff up if the user tries to tab back
    into the previous row.

    How should I do this?

    Steve Lefevre
  • Bradley

    #2
    Re: best event for update code?

    STeve Lefevre wrote:[color=blue]
    > Hey folks -
    >
    > I'm working on a form. The form is in datasheet view. There are two
    > fields of concern: "Score" and "Answer".
    >
    > I'm having problems getting the behavior I want out of it.
    > Score and Answer are both drop downs. Only Score has a tab stop.
    > Normally, the user will type in a single number for the Score, 0-9. It
    > should then update Answer based on the score, and move the cursor to
    > the Score field the next row down. All this on a single number
    > keystroke. The idea is that they can fly through the whole form by
    > pressing only number keys.
    >
    > The problem is, I can't figure out which event to base this updating
    > code on. Keypress events screw stuff up if the user tries to tab back
    > into the previous row.
    >
    > How should I do this?
    >
    > Steve Lefevre[/color]

    Ummm..

    Enter score... OnUpdate set answer and then move to required record
    (probably the next record)... SetFocus to score field (not needed if
    it's the only Tab stop)
    --
    regards,

    Bradley


    Comment

    • STeve Lefevre

      #3
      Re: best event for update code?

      Bradley wrote:[color=blue]
      >
      > Ummm..
      >
      > Enter score... OnUpdate set answer and then move to required record
      > (probably the next record)... SetFocus to score field (not needed if
      > it's the only Tab stop)[/color]

      The problem with OnUpdate is that it wants the tab or enter key to be
      pressed. Ideally I would like for the user to just hit, say, 5, it it
      would jump to the next record.

      Comment

      • Bob Quintal

        #4
        Re: best event for update code?

        STeve Lefevre <lefevre.10@osu .edu> wrote in
        news:VIdrc.252$ MY4.20@fe2.colu mbus.rr.com:
        [color=blue]
        > Hey folks -
        >
        > I'm working on a form. The form is in datasheet view. There
        > are two fields of concern: "Score" and "Answer".
        >
        > I'm having problems getting the behavior I want out of it.
        > Score and Answer are both drop downs. Only Score has a tab
        > stop. Normally, the user will type in a single number for the
        > Score, 0-9. It should then update Answer based on the score,
        > and move the cursor to the Score field the next row down. All
        > this on a single number keystroke. The idea is that they can
        > fly through the whole form by pressing only number keys.
        >
        > The problem is, I can't figure out which event to base this
        > updating code on. Keypress events screw stuff up if the user
        > tries to tab back into the previous row.
        >
        > How should I do this?
        >
        > Steve Lefevre[/color]

        The keypress idea is the best method. You just need to put some
        code to read the keypress and perform a different action if a non-
        number key like {shift}{tab} or {esc} is pressed.

        Comment

        Working...