Results 1 to 14 of 14
  1. #1
    Join Date
    Nov 2003
    Location
    Minneapolis, Mn
    Posts
    7

    Unanswered: Access Shift Key detection

    I know there is considerable press regarding activating/deactivating the Shift key override for Access databases.

    Does anyone know HOW to detect when a user has used the Shift Key (or any other key sequence) when opening an Access database ? What Access does when it opens in override mode seems to be a mystery. I would like to pick up their network alias and load it in a table with the timestamp.

    Thanks in advance for your help.
    LGH

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Re: Access Shift Key detection

    Originally posted by LGH
    I know there is considerable press regarding activating/deactivating the Shift key override for Access databases.

    Does anyone know HOW to detect when a user has used the Shift Key (or any other key sequence) when opening an Access database ? What Access does when it opens in override mode seems to be a mystery. I would like to pick up their network alias and load it in a table with the timestamp.

    Thanks in advance for your help.
    LGH
    Do you want to disable pressing this shift key?

  3. #3
    Join Date
    Nov 2003
    Location
    Minneapolis, Mn
    Posts
    7

    Re: Access Shift Key detection

    Originally posted by hammbakka
    Do you want to disable pressing this shift key?
    Thanks for the quick response.

    No. I want to be able to detect that either the left or right shift key is depressed when Access loads the database.

    LGH

  4. #4
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Cool chr(16) = shift key

    Or in plain code it's : vbKeyShift = chr(16) = SHIFT-key

  5. #5
    Join Date
    Nov 2003
    Location
    Minneapolis, Mn
    Posts
    7

    Re: chr(16) = shift key

    Originally posted by Marvels
    Or in plain code it's : vbKeyShift = chr(16) = SHIFT-key
    Thanks Marvels
    When a user opens an Access database with the shift key depressed, it bypasses the Autoexec code. Where would you place the code to detect the shift key value ?

    LGH

  6. #6
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Lightbulb make a welcome screen

    make a welcome screen
    set it at the startup
    and from there call your autoexec

  7. #7
    Join Date
    Nov 2003
    Location
    Minneapolis, Mn
    Posts
    7

    Re: make a welcome screen

    Originally posted by Marvels
    make a welcome screen
    set it at the startup
    and from there call your autoexec
    Thanks Marvels
    When the shift key is depressed, all user startup options are overridden. Which includes Autoexec macros, and Tools, Startup options.

    LGH

  8. #8
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Lightbulb found this in the help file

    just write shift in the help ass. and klick AllowBypassKey

    You can use the AllowBypassKey property to specify whether or not the SHIFT key is enabled for bypassing the startup properties and the AutoExec macro. For example, you can set the AllowBypassKey property to False to prevent a user from bypassing the startup properties and the AutoExec macro.

    Setting

    The AllowBypassKey property uses the following settings.


    Setting Description
    True (1) Enable the SHIFT key to allow the user to bypass the startup properties and the AutoExec macro.
    False (0) Disable the SHIFT key to prevent the user from bypassing the startup properties and the AutoExec macro.
    You can set this property by using a macro or Visual Basic.

  9. #9
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Exclamation watch out for yhis

    Remarks

    You should make sure the AllowBypassKey property is set to True when debugging an application.
    This property's setting doesn't take effect until the next time the application database opens.

  10. #10
    Join Date
    Nov 2003
    Location
    Minneapolis, Mn
    Posts
    7

    Re: watch out for yhis

    Originally posted by Marvels
    Remarks

    You should make sure the AllowBypassKey property is set to True when debugging an application.
    This property's setting doesn't take effect until the next time the application database opens.

    Do you know if you can recover a corrupted database when AllowBypassKey is set to False ?

  11. #11
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Question i think so but im not sure

    What happend is it corrupt now or what ????
    if not (pfiwee, had a scare there), you could try it on a local small db as a test

    i allso saw the AllowSpecialKeys Property this will prevent a user from displaying the Database window by pressing F11, entering break mode within a Visual Basic module by pressing CTRL+BREAK, or displaying the Debug window by pressing CTRL+G.

  12. #12
    Join Date
    Nov 2003
    Location
    Minneapolis, Mn
    Posts
    7

    Re: i think so but im not sure

    Originally posted by Marvels
    What happend is it corrupt now or what ????
    if not (pfiwee, had a scare there), you could try it on a local small db as a test

    i allso saw the AllowSpecialKeys Property this will prevent a user from displaying the Database window by pressing F11, entering break mode within a Visual Basic module by pressing CTRL+BREAK, or displaying the Debug window by pressing CTRL+G.
    No. It is not corrupted.
    I have not implemented the ABKey yet because I do not know either and this is a difficult thing to test.
    Due to poor network performance, the dbs cannot be split.
    I can create mde files, but the qry designs are exposed and a table could be deleted.
    I would know immediately if a table has been deleted and I keep a close eye on the Last Modified dates for object changes.
    The dbs have a startup form set in Tools, Startup.
    What happened recently is someone modifed the report level filter property on several reports. They did this by using the shift override. Compiling would prevent the report filter change problem as does setting the FilterOn = False in vba for all of the reports (approx 200). BUT, I still do not know which one of the users figured out how to set the report filter property.
    Hence, the question "how can I tell who got in that way ?" I would like to be able to find out who attempts to get into the database using the override.
    Many people do not create mde files or disable keys and somebody messes with their objects and they don't know who. This would help everyone find out the "who."
    LGH

  13. #13
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile Re: i think so but im not sure

    Originally posted by LGH
    No. It is not corrupted.
    I have not implemented the ABKey yet because I do not know either and this is a difficult thing to test.
    Due to poor network performance, the dbs cannot be split.
    I can create mde files, but the qry designs are exposed and a table could be deleted.
    I would know immediately if a table has been deleted and I keep a close eye on the Last Modified dates for object changes.
    The dbs have a startup form set in Tools, Startup.
    What happened recently is someone modifed the report level filter property on several reports. They did this by using the shift override. Compiling would prevent the report filter change problem as does setting the FilterOn = False in vba for all of the reports (approx 200). BUT, I still do not know which one of the users figured out how to set the report filter property.
    Hence, the question "how can I tell who got in that way ?" I would like to be able to find out who attempts to get into the database using the override.
    Many people do not create mde files or disable keys and somebody messes with their objects and they don't know who. This would help everyone find out the "who."
    LGH
    Do you use user level security?

    I was just thinking that maybe you set up a procedure in a module that ran on a timer and checked your forms and reports for being in design view. You could then store in a table the name of the object that was in design view, the current user and maybe the time.

    I'm not sure how the actual implementation for this would work out but I've used the concept a few times to log errors associated with a particular user.

    Just a thought.

    Gregg

  14. #14
    Join Date
    Nov 2003
    Location
    Minneapolis, Mn
    Posts
    7

    Re: i think so but im not sure

    Originally posted by basicmek
    Do you use user level security?

    I was just thinking that maybe you set up a procedure in a module that ran on a timer and checked your forms and reports for being in design view. You could then store in a table the name of the object that was in design view, the current user and maybe the time.

    I'm not sure how the actual implementation for this would work out but I've used the concept a few times to log errors associated with a particular user.

    Just a thought.

    Gregg
    Thanks for the thought Gregg. I have also done something like that in the past.
    If we knew if any triggerable event occurred when a db is opened with the override, that could be implemented.

Posting Permissions

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