Results 1 to 8 of 8
  1. #1
    BruceUK is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2011
    Posts
    48

    Problem with using function key F8 when debugging VBA code

    I'm running Windows 10 and I'm using an Access database originally created several years ago. The database is in Access 2000 File Format (i.e. with a .mdb extension).



    For debugging purposes, I've set up a breakpoint in some VBA code. However when I'm trying to step through the code, pressing the function key F8 and its various combinations with the Shift and Ctrl keys doesn't work. Instead of stepping to the next line, I'm getting a screen displayed that is nothing to do with Access but some kind of hardware-related screen management function. To step through the code, I'm having to use the drop-down options on the Debug menu, which is obviously much more time-consuming.

    I have a feeling this function key issue might be because I'm using an old Access file format. I suppose I could convert the database up to the current format, but that might cause some other unforeseen issues in the application. Is there any way I can recover the use of the function keys without converting the database?

    Any suggestions would be greatly appreciated!

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    The F8 and stepping through vba code has been around for a long time. I don't think it is simply an issue with accdb vs mdb.

    If you do decide to bring the database to a more recent version of Access, be AWARE that some current functionality may be lost. Newer versions do not always support older features. Here's a link that overviews some versions and features.

  3. #3
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Are you perhaps on a laptop where the function keys serve dual purposes? You may have to hold down another key to get the standard function key functionality. On my laptop it's a blue "Fn" left of the space key.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    BruceUK is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2011
    Posts
    48
    Quote Originally Posted by pbaldy View Post
    Are you perhaps on a laptop where the function keys serve dual purposes? You may have to hold down another key to get the standard function key functionality. On my laptop it's a blue "Fn" left of the space key.
    Ah, yes, that's the explanation! I've never really noticed that 'Fn' key before, so now I know why it's there! Many thanks for your help!

  5. #5
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    You set it per session to lock it - press FN and caps lock key at the same
    https://support.microsoft.com/en-us/...e-command-keys

    Or you can change it permanently in the Bios and/or control panel, depending on the manufacturer i.e. you then use the Fn key to access the other options
    https://www.howtogeek.com/235351/how...-special-keys/

    suggest click on windows icon on the tool bar and type 'function keys'

  6. #6
    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
    Allen Browne also has an excellent bunch of step-by-step tutorials on the subject:

    http://allenbrowne.com/Access2007.html

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

    All posts/responses based on Access 2003/2007

  7. #7
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Quote Originally Posted by BruceUK View Post
    Ah, yes, that's the explanation! I've never really noticed that 'Fn' key before, so now I know why it's there! Many thanks for your help!
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Quote Originally Posted by Missinglinq View Post
    Allen Browne also has an excellent bunch of step-by-step tutorials on the subject:

    http://allenbrowne.com/Access2007.html

    Linq ;0)>
    Wrong link, wrong thread, or am I blind?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 07-30-2018, 08:59 AM
  2. Debugging VBA code
    By Lou_Reed in forum Access
    Replies: 8
    Last Post: 05-03-2017, 11:25 AM
  3. Debugging - F8 not stepping through the code?
    By djspod in forum Programming
    Replies: 5
    Last Post: 03-15-2017, 09:05 AM
  4. problem in code for if function
    By majidrazlighi in forum Programming
    Replies: 3
    Last Post: 05-02-2016, 06:22 PM
  5. VBA If Then function - problem in code
    By Knelou in forum Access
    Replies: 63
    Last Post: 09-25-2013, 10:49 PM

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