We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

How to better understand the VBS Editor

Low Priority
50 Views
Last Modified: 2020-06-11
I am 'self-taught' regarding developing somewhat simple Access databases..Some for Non-Profits and some for where I work. I am usually able to goggle/figure things out..But I have a question that I can not figure out (and will probably display my over-all lack of real training...

I am using Office 365. I think this is just an 'over-all' kind of question regarding the VBS editor in Access. For instance I might see this statement - "Private Sub Combo96_AfterUpdate()" in the editor
My question is - I can not find Combo96 anywhere in the database. Yes I now I should have named it something useful...That is not what this question is about. It is about understanding the Editor better. I can not figure out how to tell where this control is located...
If I look to the left of the editor at the 'Project' window there is a Report listed that is slightly highlighted with grey...but there is no Combo96 on or connected with that report.

Any guidance would be helpful...Thanks
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2015
Distinguished Expert 2018

Commented:
If no control in the report or elsewhere is named Combo96, it is a left-over from a previous form or report.

And the editor is VBE editing VBA. VBS is something very different: VBScript.
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
NorieAnalyst Assistant
CERTIFIED EXPERT

Commented:
Do you mean the VBA Editor?

If you are then you should find two dropdowns at the top of the Code Window, the one on the left should show a list of all the controls on the form and when you select a control you should see a code stub for the default event of that control.

While you have a control selected in the left-hand dropdown you can use the right-hand dropdown to access the other, i.e. non-default, events of the control.
Chief Technology Officer
CERTIFIED EXPERT
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Mark EdwardsChief Technology Officer
CERTIFIED EXPERT

Commented:
If you are in the VBE and need the name of the object that has the code you are looking at, look at the top of the VBE window (title bar) and it will tell you.
John TsioumprisSoftware & Systems Engineer
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Normally when you have something like this
Private Sub Combo96_AfterUpdate() 
then its an AfterUpdate event from a control of your form
To locate it just switch to design view of your form -->Properties and look on the right side for it

   If its more "mysterious" then the best alternative is to export all your database as text : https://www.access-programmers.co.uk/forums/threads/export-all-database-objects-into-text-files.99179/
and use a search application like Agent Ranshack to search inside all these text files for the elusive piece of code
There are also some Search utilities for Access but i haven't used them ...here is a quick result from Google : https://www.skrol29.com/us/vtools.php
Fabrice LambertConsulting
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
Maybe a code analysis tool such as MZ-Tools or Rubberduck will be usefull.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.