Solved

Access VBA debug - make switchboard appear for user entry

Posted on 2012-03-13
6
541 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

636 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