Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where is all the VBA code hidden? 1

Status
Not open for further replies.

Quintios

Technical User
Mar 7, 2002
482
US
Very very newbie question here. When looking at example databases (Access97) the VBA code is not kept in central location as it is with MS Excel or Word. For example, the VBA code associated with an Option Group in a Form is not necessairly kept in a Module, but instead kept in the Form somewhere as an 'Event Procedure'.

Is there a way to look at the VBA code for a database without having to dig into all the forms and queries and tables etc.?

Thanks in advance,
Q-
 
Q-
When looking at the design view of a form you may find that some buttons or text boxes have "Event Procedure" specified in one of the events that is associated with it. If you click on "Event Procedure" a little box will appear to it's right that will have "..." (three periods in it) click on that and you will be taken into the form's module, and directly to the code that is written to be activated on the specific event for that button or textbox.

Alternatively you can, when in design view of a form, click on the Module button. It's the Square shape with a star shape to the upper left, and red yellow and cyan rectangles. That button will take you to the Form's module as well, but not to any specific part of it.

Hope that helps --
-Dan
 
Well, sorta. What I was saying was, is there a way to look at VBA code without digging into the design mode of various forms? I realize that you can get to the properties of a given control and click on the event procedure, but I don't want to even do that. I just want to click on something and it shows me ALL the VBA code that exists in the database. No opening forms, no right-clicking for properties, just one big page with all the code, regardless of where the code resides or what it's used for.

Am I making sense?

Q-
 
Yes,
but in Word and Excel you can have code in UserForms. This too is on events within the Form and Form Objects.

To get Listing of all the code you can use the Documentor function in (Access97)
Tools
Analyze
Documentor

Select the forms and modules going into the options and selecting the options so that only the code is output. Once the documentor has run you can output the result to Word. Sandy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top