Results 1 to 9 of 9
  1. #1
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    London, Ontario, Canada
    Posts
    437
    Thanks
    0
    Thanked 0 Times in 0 Posts

    AutoKeys nasty (AccXP)

    I've just discovered a very nasty autokeys problem and wonder if anyone has a solution. I created a database in Acc'97 years ago and recently converted it to XP. One of the features used is autokeys to insert a users name, date and time in various memo fields when notes are updated i.e. SendKeys Jerry: ^; - Time: ^:^{Enter}. This time stamp is crucial to the overall operation and used frequently. Recently we noticed one of the users often observed a problem when entering the control sequence. The code would go into a loop repeatedly entering data into the memo field, I assume eventually overflowing and resulting in the deletion of the record being worked on! I could not reproduce this problem on any other workstation and we assumed a hardware problem and changed the keyboard eventually the entire workstation was swapped and the problem still occurred. Lo and behold, I come to find this is reproducible. It occurs when AutoKey combinations ( CTL-(Letter)) are entered using the right hand control key. Every time. Believing there must be some corruption I created a blank database and created a new macro to test the hypothesis and sure enough it deletes records. I can find no mention of this in the knowledge base. Has anyone else encountered this?

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

    Re: AutoKeys nasty (AccXP)

    Brian
    I too had this issue some time ago.
    Although slightly different problems, I could not overcome it.
    This lead me to a re-install of Operating system and an upgrade of Office.

    Sometime later I saw a utility on the UtterAccess.com site (Awesome Code Section) which is supposed to combat the problem.
    But.
    The UtterAccess site has been down for a few days now and don't know when it will be back.
    If you don't solve your problem by other means, keep checking to see if the site is back up.
    The utility may be just what you're after.

  3. #3
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    London, Ontario, Canada
    Posts
    437
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoKeys nasty (AccXP)

    Thanks Dave, appreciate the input and in fact I think I found Dev Ashish replacement for SendKeys. and I could return to the project and replace myriad occasions of SendKeys with that fix in fact may have to do just that., but I guess my question is, why on earth does Access offer SendKeys and then have such a MAJOR bug? This is going to cost me in a big way and it seems terribly unfair. All Access developers should be aware; this is a major bug in the software. MS states clearly in the knowledge base that you should avoid SendKeys, but that's after the fact. Take my word for this ... stay away from it.

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

    Re: AutoKeys nasty (AccXP)

    Microsoft has *always* recommended against SendKeys. It was primarily included for use in macros rather than in code because there isn't any other way to transmit key values in a macro.
    Charlotte

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

    Re: AutoKeys nasty (AccXP)

    I should add that there have been much more elegant ways of capturing this kind of data since at least Access 2, and the same warning has been around since then. With user security, it is very easy to capture the user name, and the date/time of an update is available with the Now() function. Finally, storing comments in a single memo field is a bad idea. It's far to easy for a user to erase existing data, or get things out of sequence. Use individual records, with user ID and a time stamp so they can be sorted chronologically.
    Wendell

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

    Re: AutoKeys nasty (AccXP)

    Brian
    As a matter of interest, what is the Dev Ashish alternative ?
    Do you have a link to this information?

    Thanks

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: AutoKeys nasty (AccXP)

    Brian is probably sleeping at the moment. Dev Ashish's Access Web (a goldmine of useful Access tips) is http://www.mvps.org/Access and the SendKeys replacement is here.

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

    Re: AutoKeys nasty (AccXP)

    Thanks for the links Hans <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  9. #9
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    London, Ontario, Canada
    Posts
    437
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoKeys nasty (AccXP)

    Sorry, I should have posted the link. Thanks Hans. The story is, I wrote this app in 1997 and frankly it's been ticking along just fine until XP. The use of SendKeys was as you've determined a problem within a problem. The major component of the application was logging notes (some 15,000 of them in fact) and the solution seemed to be the use of memo fields and the only way I could see to easily insert time stamp information was through SendKeys. Well obviously in retrospect, I should have found another way. The fix will undoubtedly take a great deal of work and at this point I'm working on a consulting basis so they've decided for now to look at another solution, either removing the offending operators right thumb or, removing the right CTL key cap. I think they'll go with the CTLectomy. <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15> Thanks all, and anyone reading this thread .... when it comes to SendKeys ... just say no.

Posting Permissions

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