Results 1 to 9 of 9
  1. #1
    Lounger
    Join Date
    Mar 2002
    Location
    St Albans, Hertfordshire, England
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PageUp and PageDown (2000 SR1)

    Do you ever have one of those days?

    For the life of me, I can't remember how to disable the PageUp and PageDown Keys - I've done it so many times in the past, but now it just seems to escape me! <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

    Thanks

    Highly Shamefaced! <img src=/S/blush.gif border=0 alt=blush width=15 height=15>

  2. #2
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Nevada, USA
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: PageUp and PageDown (2000 SR1)

    Chris:

    I've used code similar to the following to disable these keys. It would go in the control's Key Down event.

    Select Case KeyCode
    Case 33
    ' Disable the keystroke by setting it to 0
    KeyCode = 0
    Case 34
    ' Disable the keystroke by setting it to 0
    KeyCode = 0
    Case Else
    Debug.Print "else" & KeyCode & Shift
    End Select

    Hope this helps.
    Carol W.

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

    Re: PageUp and PageDown (2000 SR1)

    It depends on what you're disabling it for. If you want to totally disable it, then the suggestion already posted will work. If you just want to keep the user from navigating between records using it, change the cycle property of the form to Current Record.
    Charlotte

  4. #4
    Lounger
    Join Date
    Mar 2002
    Location
    St Albans, Hertfordshire, England
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: PageUp and PageDown (2000 SR1)

    Thanks Guys <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15> - This does the trick, and on hindsight, is very similar to the process I have used before.

    Let's hope I don't have too many of these black holes forming, otherwise I might need to take a look at my career path!

    Cheers,

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: PageUp and PageDown (2000 SR1)

    Strange - I had filed your tip away as I had a user form that I wanted to do this to. When I tried testing it this morning it doesn't seem to work. I'm using AccessXP but the DB is in 2000 format. Is there another step I'm missing? Or just bad karma with the PageUp/Down keys this morning? I'm using a combo box for simple lookup of records in a small database, and some clever user discovered they could use the PageUp/Down keys to move from record to record. Of course the combo box doesn't know to change since I didn't program it, so I figured I would just disable the keys with the Cycle property. Looks like now I'll have to write an OnCurrent event handler for the form. <img src=/S/frown.gif border=0 alt=frown width=15 height=15>
    Wendell

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

    Re: PageUp and PageDown (2000 SR1)

    If you set the form's cycle property to Current record, the page up and down keys should NOT move between records. I refuse to have AXP on the same machine with A2k (got burned that way once), so I can't check the equivalent in XP but that shouldn't have changed between what is essentially a maintenance release.
    Charlotte

  7. #7
    New Lounger
    Join Date
    May 2001
    Location
    Detroit-Metro, MI
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: PageUp and PageDown (2000 SR1)

    I'm no expert on this one, but I've got a form set to cycle only the Current Record, and the PgUp and PgDn keys do all sorts of crazy stuff (e.g. work properly for a couple of minutes, cycle records 3 - 4 times, then do nothing...)?!?!

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

    Re: PageUp and PageDown (2000 SR1)

    I certainly won't argue with you about it. What I have done in the past has been to trap those keys and code around them. I don't build forms that need them, and I haven't run into the problem.
    Charlotte

  9. #9
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: PageUp and PageDown (2000 SR1)

    As I dug into this I discovered the same thing as csallen - the Cycle property seems to control the Tab and Enter key behavior, but PageUp and PageDown don't seem to be affected by it some or all of the time.
    Wendell

Posting Permissions

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