Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access VBA debug - make switchboard appear for user entry

Posted on 2012-03-13
6
Medium Priority
?
546 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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 1500 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

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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…

688 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