Avatar of Cook09
Cook09Flag for United States of America

asked on 

F8 not working in Microsoft Access 2007

In attempting to debug, or to step through some existing code, within Access 2007, the F8 key does not allow one to step through the Subs...either Private or just Sub.  What would be causing this to occur?   At the moment I'm just at the Forms that begin the Start-up  Code, for the application.
Microsoft AccessMicrosoft OfficeMicrosoft Applications

Avatar of undefined
Last Comment
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Avatar of Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Flag of United States of America image

First check in the  Access Options under current database and be sure  Use Access Special Keys is checked. See image below

Also some keyboards have function keys that also have another purpose. Do the keys have something else on them. If so, be sure they are enabled.

This may also help:
Error Handling and Debugging Tips for Access 2007, VB, and VBA
http://msdn.microsoft.com/en-us/library/ee358847%28v=office.12%29.aspx

User generated image
Avatar of Hamed Nasr
Hamed Nasr
Flag of Oman image

Other running program may be assigning F8 for one of its functions.
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

On of my keyboards has a Fn Lock, which resets itself to unlocked after I reboot.  That's the first thing I check.
Avatar of Cook09
Cook09
Flag of United States of America image

ASKER

How would I know if another running program is using the F8 key?  I can open Excel and the F8 key works as it should.  The other issue is that I put a control break on virtually every Sub or Function, and then ran the OpenMenu macro, and the code never stopped, it put up the main screen and pulled in the appropriate printers.  How would the code still be working with almost all of the code having some control break within it?
Avatar of Hamed Nasr
Hamed Nasr
Flag of Oman image

"How would I know if another running program is using the F8 key? "

Snagit, a screen capture software. I assigned F8 to trigger recording. I ran code and and it stopped a a break point. Pressed F8, it did not step into code, instead it showed the capture selection.

It depends on which program has higher priority to intercept the hot key (F8 in this case).

You know which program if it starts processing the action, if it continues to process the code, then another issue is causing this.

Try to reproduce the issue with a sample database and upload.
Avatar of Cook09
Cook09
Flag of United States of America image

ASKER

Attached is a safe database with the VBA.  Hopefully, you can find out the F8 issue.
Test1.accdb
ASKER CERTIFIED SOLUTION
Avatar of Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Cook09
Cook09
Flag of United States of America image

ASKER

Well, what was interesting was that I did check that box, and wonder how it became unchecked.  What I have found is that if there is an error that needs debugged, F8 works okay.  To just display the Code from a Form, and try to step through, it doesn't work.  I don't believe it makes a difference between Private Sub or Sub, but I've tried both and nothing happens, unless there is an error.

Were you able to step through all of the code connected to the forms?
Well, what was interesting was that I did check that box, and wonder how it became unchecked.

Do you possible have VBA code that turns it off at startup?

I held down the shift key when I opened you data to avoid any start up code. I open a code module and figured out a name of something I could call from the immediate window.  I was not able to use breakpoints of F8 until I checked the Use Access Special Keys. Then everything worked.
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo