Access Form Command Button

  • This may help :


    ControlName is the control name of that field on form.


    Code
    Private Sub Command1_Click()
        Me.ControlName.SetFocus
        SendKeys "^+{2}", True
    End Sub


    Regards.

    Suat

  • Quote

    Originally posted by Anonymous
    Thank you very much.
    What are the keystrokes "^+{2}" Ctrl-Shift-2 ?
    I changed them to "^{'}" , Ctrl-Aposthrophe


    And it works great.
    Thank you again


    Yep, "^+{2}" = Ctrl-Shift-2 and your one is the same and better for reading.


    You're welcome.

    Suat

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!