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
550 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

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

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

930 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

16 Experts available now in Live!

Get 1:1 Help Now