Results 1 to 6 of 6
  1. #1
    ironfelix717 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    150

    MS Access VB Editor - Compile Hotkey

    Does a Compile hotkey exist in the VB Editor? (Debug > Compile>DatabaseName)



    This would increase productivity for me (mostly because im a lazy programmer and prefer to verify the code before going into the form and testing)

    And I am so lazy in fact, going up to the Debug dropdown is too much labor lol. Every second counts for something, right.


    If not,
    How might I set one? Is there any software or code to do so?

    Thanks


    Regards,

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    The keyboard shortcut is Alt+D+L

    More usefully, use this code DoCmd.RunCommand acCmdCompileAllModules.
    You could create a function using that code

    Code:
    Public Function CompileAllModules()
    DoCmd.RunCommand acCmdCompileAllModules
    End Function
    Then assign a simple shortcut to run the function using an Autokeys macro e.g.
    Click image for larger version. 

Name:	Autokeys macro.PNG 
Views:	12 
Size:	1.9 KB 
ID:	37136
    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

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    All this is easier than a mouse click on the toolbar button??

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    well technically it is one hand, one finger and two clicks v two hands, three fingers and one concerted keypress. Actually make that four fingers - forgot about the shift key

    Or you can make it one hand, one finger and one click by simply dragging the compile option onto the toolbar - although agree you do have to move the mouse a bit

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Yeah, I forgot that I use simple built in features by adding them to toolbars. With one mouse click I can compile, indent, outdent, comment/uncomment blocks, step through (not as a group of course). I guess I could add more, but these are the ones I use regularly.
    I hope they never put a ribbon in the vbe.

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Ha! Oh you cynics ....
    I never said it was easier - just answered the OP's question as requested!!!!

    BTW I agree with you completely and I've just restored the Compile button to the main toolbar!
    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

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

Similar Threads

  1. Equation Editor in access?
    By Javier Hernández in forum Access
    Replies: 1
    Last Post: 04-23-2014, 11:47 AM
  2. How to assign a hotkey to a command button
    By tobydobo in forum Forms
    Replies: 5
    Last Post: 07-25-2013, 12:24 AM
  3. How to create Hotkey to open Query
    By MartinLutfer in forum Access
    Replies: 1
    Last Post: 05-25-2011, 01:37 PM
  4. Replies: 3
    Last Post: 04-13-2011, 10:23 AM
  5. Accessing a Tab with a HotKey
    By SCFM in forum Programming
    Replies: 2
    Last Post: 03-13-2010, 07:28 AM

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