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
536 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
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 12

Accepted Solution

by:
danishani earned 250 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 250 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
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 250 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

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

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

Suggested Solutions

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

708 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

18 Experts available now in Live!

Get 1:1 Help Now