Solved

Access VBA debug - make switchboard appear for user entry

Posted on 2012-03-13
6
501 Views
Last Modified: 2012-06-21
I am attempting to debug Access VBA code. When I set a breakpoint and choose Debug > Run to breakpoint nothing happens.  I need for the Switchboard to appear so that choices can be entered to progress through the code.  What's the magic word?   (Alt + F11 simply toggles to the Switchboard in design mode.)

thanks
0
Comment
Question by:lsmoore
  • 3
  • 2
6 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 37715464
I'm not clear from your description what is happening.

Are you saying that the code is not running or that the code is running but not stopping at the breakpoint, or something else.

Have you UNchecked the option 'Use Access Special Keys' in the startup options?  If so , that will prevent the Breakpoint from working.
0
 

Author Comment

by:lsmoore
ID: 37715518
The breakpoint is set (red line). I click Run to Cursor and nothing seems to happen.  Click F8 and I get a beep. I think the program is awaiting the user to make Switchboard choices, but I can't see the Switchboard.

Where is the "Use Access Special Keys"?
0
 

Author Comment

by:lsmoore
ID: 37715609
Incidentally, I've taken over someone else's project here.  When I click RUN, all I see are some Macros.  There does not seem to be an option run Run Form.  

thanks
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 77

Expert Comment

by:peter57r
ID: 37715738
A breakpoint is indicated by a BROWN blob in the left margin.  
RED code would indicate a syntax error in the code.

To single step through the code, first clcik the Reset button to be sure nothing is pending.
Then click into the procedure you want to run. And then press F8.  The procedure name should go yellow and you can then use F8 to step through the code.

If you still have a problem, you will have to post the code to get proper help.
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 37715841
Again, your ultimate question here is not clear...

Typically the switchboard is set to open when the DB opens, via the Autoexec Macro.

So before you start worrying about things like Breakpoints, ...
Lets make sure:
That you even have a switchboard form?
If so, can yo see it in the database window/Task Pane?
If yes, then can you open it on it's own?
If yes, then do you have an Autoexec Macro?
If so what happens when you run it.
0
 

Author Closing Comment

by:lsmoore
ID: 37716176
On my computer the breakpoint code line is bright red backcolor, with a red dot beside in the left margin.  (Code error shows red text.)
To make this debug work properly I had click VIEW OBJECT, then VIEW > FORM VIEW.  This displayed the Switchboard awaiting entry, and execution stopped at the breakpoint, as I wanted.

thanks for your help.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now