Results 1 to 8 of 8
  1. #1
    Lounger
    Join Date
    Apr 2003
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    NUM LOCK/CAPS LOCK (WINDOWS 95/ACCESS 97)

    WHEN CREATING A DATABASE AND MOVING FROM ONE FORM TO ANOTHER WITH A CLICK ON A COMMAND BUTTON THE NUM LOCK AND/OR THE CAPS LOCK TURNS OFF PERIODICALLY. DOES ANYONE KNOW WHAT TRIGGERS THIS IN ACCESS 97?

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: NUM LOCK/CAPS LOCK (WINDOWS 95/ACCESS 97)

    I have no idea what triggers it, but stop SHOUTING.

  3. #3
    Lounger
    Join Date
    Apr 2003
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: NUM LOCK/CAPS LOCK (WINDOWS 95/ACCESS 97)

    I did not mean to SHOUT and will be more careful with my typing. I believe the sendkeys in the Repeat_Last Module I was using is what was causing the Caps Lock key to turn off. More that likely the "^' " portion of it.

  4. #4
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: NUM LOCK/CAPS LOCK (WINDOWS 95/ACCESS 97)

    Actually, Sendkeys has a notorious 'bug', which can toggle the state of the Numlock key. The best way to avoid this, is to not use Sendkeys! <img src=/S/grin.gif border=0 alt=grin width=15 height=15> However, if you must use it, then you can set a boolean variable to the current state of the Numlock key, run Sendkeys, then compare the original state to the now current state, and switch it back if necessary. Completely invisible process to the user. I have a keyboard class, which will work , if you want.

  5. #5
    Lounger
    Join Date
    Apr 2003
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: NUM LOCK/CAPS LOCK (WINDOWS 95/ACCESS 97)

    I would enjoy seeing the boolean variable that compares the original state to the current state. Thank you in advance.

  6. #6
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: NUM LOCK/CAPS LOCK (WINDOWS 95/ACCESS 97)

    I am attaching an A2k mdb, which has a form, and a Class module. The class module is my 'Keyboard Class' (somewhat stripped down, to just toggle keys)

    The form has a Start Process, and Stop Process. Click Start Process. Then change the state of numlock, capslock, and/or scroll lock. Any combination you want. Then click 'Stop Process', and it will set the toggle keys back to the state they were in, when you clicked the Start Process.

    So, to get around the SendKeys bug, you would do this:

    Dim kb as Keyboard
    Dim blNumlock as Boolean
    Set kb=New Keyboard
    blNumlock=kb.Numlock
    'Run your SendKeysCode here
    kb.Numlock=blNumlock
    set kb=nothing

    That will put the numlock key back to the same state it was in, before the Sendkeys code.

    Hope that helps.
    Attached Files Attached Files

  7. #7
    Lounger
    Join Date
    Apr 2003
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: NUM LOCK/CAPS LOCK (WINDOWS 95/ACCESS 97)

    Thank you for this A2k mdb. I got busy with another database, but hope to put your mdb to use next week. It looks as if it will work beautifully. Once I try it out I will let you know. Thanks again.

  8. #8
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: NUM LOCK/CAPS LOCK (WINDOWS 95/ACCESS 97)

    You are quite welcome. Hope it works well for you.

Posting Permissions

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