Stepping through Code??

T

TotallyConfused

In code view, how do I run code to see what it does. I inherited a db that I
am trying to figure out. There are queries and forms that may not be needed
and would like to figure out a way to step through the code to see what works
and what doesn't. Unless there is a better way to do this? Can someone
please guide me? Thank you in advance for any help you can provide.
 
R

RoyVidar

TotallyConfused said:
In code view, how do I run code to see what it does. I inherited a db
that I am trying to figure out. There are queries and forms that
may not be needed and would like to figure out a way to step through
the code to see what works and what doesn't. Unless there is a
better way to do this? Can someone please guide me? Thank you in
advance for any help you can provide.

You will find most of the information you need in the Debug menu in
the VBE - which also lists shortcuts for the most used/interesting
choises such as for instance

F9 - Toggle breakpoint
F5 - Run
F8 - Step into
Shift+F8 Step Over

Then, also check out what's availabe through rightclick when you're
running say line by line, for instance

Run To Cursor
Set Next Statement

Then there's the watch (Quick Watch - Select the expression and hit
Shift+F9) and the Watch window

Remember that F5/F8 to run/step into, only works with subs in standard
modules without parameters. For functions and subs with parameters,
you need some way of invoking them. For instance set a breakpoint and
invoke them from the interface, of the immediate window (Ctrl+G).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top