Results 1 to 5 of 5
  1. #1
    recordman66 is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2019
    Posts
    1

    Hotkey for a button working without errors, but clicking the button returns error?


    I've got a weird one for you. I have a button on my form that has an included hotkey, i.e. (Temp Pull &T). If I use Alt+T the button works, but if I click on the button it returns an error with the Module. Got any ideas?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    What is the error message?

    What is the code?
    Last edited by June7; 08-25-2019 at 12:14 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    What key did you mean when you wrote 'Temp Pull'?
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    And what is the code for the button/what does it do?

    I can see this being the situation if the button did something that requires another Control to have focus when the code executes...the hotkey would execute the code properly...but by clicking on the button, focus would have been moved to the button, not on the other Control.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Actually, hotkey does move focus to the button. At least I see it has dashed line around it, same as clicking on it and cursor is no longer in textbox.

    Sometimes weirdness is corruption. Try deleting and rebuilding the button.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Automating Button Clicking
    By csn102 in forum Programming
    Replies: 3
    Last Post: 11-05-2015, 02:01 PM
  2. Replies: 2
    Last Post: 09-15-2015, 03:08 AM
  3. Form Button Not working Error 2465
    By dmon2010 in forum Forms
    Replies: 1
    Last Post: 06-18-2014, 08:33 AM
  4. Replies: 3
    Last Post: 10-30-2013, 05:59 AM
  5. How to assign a hotkey to a command button
    By tobydobo in forum Forms
    Replies: 5
    Last Post: 07-25-2013, 12:24 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums