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

x
?
Solved

How do you trace back the code in a Microsoft Access Form or switchboard so that I can see precisely the VB code that made it.

Posted on 2012-03-29
8
Medium Priority
?
600 Views
Last Modified: 2012-04-19
I have some code that was built in Microsoft Access 2007 and VB. I need to know if and how you can select a button or area in a form then see exactly what code in the "back end" of the code made it. Is there a way to make sure that all the code that makes the button switchboard item is highlighted so that I know exactly what makes that button....? Does that make sense. I have to add some similar code and need references  Please advise thank you.
0
Comment
Question by:ruavol2
[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
  • 2
  • +1
8 Comments
 
LVL 12

Accepted Solution

by:
danishani earned 1000 total points
ID: 37785427
Are you talking about a Switchboard a la Access 2003 style or a Customized Switchboard based on a Form with buttons on it?

I assume it's the last scenario, then you can go to Form Design and then click on one of the buttons, then go to the property sheet on the right side and click on Tab Event, then go to the On Click event. You will see the [Event procedure] next to it. Then click on the three dots ... and you are in the VBE window.

Hope this helps,
Daniel
0
 

Author Comment

by:ruavol2
ID: 37785710
Ooops I must be lythargic from working with no sleep. Here is what I would like to be able to do is click on the object in the form and go straight to the "highlighted code that makes up that object. Can this be done. Please advise thank you.
Switchboard-Buttons.png
Form-Buttons.png
0
 
LVL 12

Assisted Solution

by:danishani
danishani earned 1000 total points
ID: 37785731
Ah ok so that is the legacy switchboard, in that case you can look into this thread on how to modify, add or delete items in it:
http://office.microsoft.com/en-us/access-help/create-and-use-a-switchboard-HA001213876.aspx

Well, If you don't like the design/ the look of it then you can create a Form with buttons, labels, images etc. which you have full control over.

Another option is by creating some custom Ribbon menu:
http://www.databasejournal.com/features/msaccess/article.php/3803996/Making-Your-Own-Access-2007-Ribbon.htm

Check also Gunter Avenius website:
http://www.accessribbon.de/en/

Hope this helps,
Daniel
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 1000 total points
ID: 37785984
The code that creates a switchboard using Switchboard Manager is contained in a wizard so it is not accessible.

 The code created by the wizard to operate the switchboard is all visible in the switchboard form module.  If you can follow it, you are probably in the wrong job - you should be in the security service decoding enemy messages (:-)

Most developers do not use Switchboard manager because of the difficulties in customising it and it  rarely moves succesfully between Access versions.

Switchboard Manager is not part of the default Access UI after A2003 although it can be invoked through code.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37787248
Can you just post a clear graphical example of what you are after here...
(just posting images of button does not really make this any clearer...)
It is still not clear what you are after...

<he code that makes the button switchboard item is highlighted>
Highlighted where?

<so that I know exactly what makes that button>
What makes a button...? what does this mean?
0
 

Author Comment

by:ruavol2
ID: 37788784
If you were having to DeBug a VB coded app deisgned in Access you would click a button and the error debugger would take you straight to the code in question and highlight it in yellow. I would think you could click say for instance my form buttons and be able to go right to the code and see what made the button and what was behind it.......I would think maybe I am dreaming.
0
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 1000 total points
ID: 37790569
Yes well this is the 'problem' in customising the switchboard.

All the buttons in the switchboard use the same code, as you will see if you look at the properties of any switchboard button.
The click event just calls a general function and supplies the button number as a parameter value.
0
 

Author Closing Comment

by:ruavol2
ID: 37867375
That helped thank you.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

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