Results 1 to 4 of 4

Thread: Key Event

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    5

    Exclamation Key Event

    I have a datagrid that has a notes column, I want the user to be able to hit enter in the grid and have it go to the next line like when ctrl enter is hit.

    In other words I want to program the enter key to be the ctrl enter key for that datagrid. Thanks

    Jim

  2. #2
    Frenzied Member
    Join Date
    May 2003
    Location
    So Cal
    Posts
    1,564

  3. #3
    Let me in .. techyspecy's Avatar
    Join Date
    Aug 2002
    Location
    Back to VBF.
    Posts
    2,456

    Re: Key Event

    Originally posted by jazz823
    I have a datagrid that has a notes column, I want the user to be able to hit enter in the grid and have it go to the next line like when ctrl enter is hit.

    In other words I want to program the enter key to be the ctrl enter key for that datagrid. Thanks

    Jim
    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub DataGrid1_KeyPress(KeyAscii As Integer)
    4.     On Error Resume Next
    5.     If KeyAscii <> vbKeyReturn Then Exit Sub
    6.     DataGrid1.Row = DataGrid1.Row + 1
    7.     On Error GoTo 0
    8. End Sub

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    5

    close

    Thanks Marc and others,

    Marc your suggestion sent me to the next row, where I was looking to go was a new line like a carriage return, so that the note can continue in the same line. I did not want the end user to have to remeber ctrl+enter

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width