Results 1 to 7 of 7
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Up - Down Keys (A2000)

    I have two forms.
    On one form, the user can navigate thru the fields using the up/down arrow keys.
    The other form won't let you do this and the tab has to be used.
    The properties seem to be the same for both.

    ????? Any Idea's


    Dave

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Up - Down Keys (A2000)

    Do you have some code in one of the 3 On Key events ?
    Francois

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Up - Down Keys (A2000)

    I have codes in the key events on both forms but I think this is causing the prob: -

    me!Whatever.selStart = me!Whatever.selLength ??????

    In the on_enter of the field

    Dave

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Up - Down Keys (A2000)

    Yes, I test it and have the same problem.
    Francois

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Up - Down Keys (A2000)

    I have this on each field in the form.
    I've also tried tried this cursor behaviour from options but don't like how it re-acts in certain places.
    Wonder if there is a remedy without using Keycode=vbkeyup / down

    Dave

  6. #6
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Up - Down Keys (A2000)

    In the on keydown of each control, you could use :
    <pre>Private Sub WhatEver_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 39 And Me.WhatEver.SelStart = Len(Me.WhatEver) Then
    Me.WhateverControlComeNext.SetFocus
    End If
    End Sub</pre>

    I have only test it on textbox controls
    Francois

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Up - Down Keys (A2000)

    Actually, just replace the Me.WhateverControlComeNext.SetFocus with a KeyCode = vbKeyTab, and it should work.
    Charlotte

Posting Permissions

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