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
559 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access 2016 7 33
Normalization of a table 19 69
VB.NET 1 21
Store results in vb.net 3 20
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…
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…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
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…

813 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

12 Experts available now in Live!

Get 1:1 Help Now