none
how can i get event key in access vba RRS feed

  • Question

  • Hi

    I used to handle event  key for example alt key  and I sorted  a  list if user got alt key descending or not I sorted ascending the list 

    Actually  I forget the code and whatever I searched in google I couldn't find the code

    I appreciate  if anybody help me.

    Thanks Tomas

     

    Monday, March 28, 2016 3:00 PM

Answers

  • Hi, Tomas Anderson03

    its looks like you are talking about key press event.

    so here I mentioned one example of it.

    Private Sub Text7_KeyPress(KeyAscii As Integer)
    Dim strCharacter As String
     
     ' Convert ANSI value to character string.
     strCharacter = Chr(KeyAscii)
     ' Convert character to upper case, then to ANSI value.
     KeyAscii = Asc(UCase(strCharacter))
    End Sub

    if you want to get more information regarding this event then please visit the following link.

    Form.KeyPress Event (Access)

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 29, 2016 2:46 AM
    Moderator

All replies

  • Hi. Are you talking about using an Autokeys macro or using the KeyDown or KeyPress event?
    Monday, March 28, 2016 3:20 PM
  • Hi, Tomas Anderson03

    its looks like you are talking about key press event.

    so here I mentioned one example of it.

    Private Sub Text7_KeyPress(KeyAscii As Integer)
    Dim strCharacter As String
     
     ' Convert ANSI value to character string.
     strCharacter = Chr(KeyAscii)
     ' Convert character to upper case, then to ANSI value.
     KeyAscii = Asc(UCase(strCharacter))
    End Sub

    if you want to get more information regarding this event then please visit the following link.

    Form.KeyPress Event (Access)

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 29, 2016 2:46 AM
    Moderator
  • Hi Deepak Panchal

    Thanks for your answer,  I delivered my project but your link (Form.KeyPress Event (Access)) I  red and  in another  section I mean keyDown there is an example .  I have to work on it but i think I'll find the solution.

    Thanks so much for your time and your answer

    Regards

    Tomas

    Tuesday, May 3, 2016 7:42 PM