Pressing F5 in VBA Editor operates incorrectly?

  • Thread starter Thread starter Paul-M
  • Start date Start date
P

Paul-M

Pressing "F5 - Run Sub/User Form" on the Access Menu
operates correctly when using Access Databases created by
professionals (WROX book authors) Therefore, I think
Access is installed and updated correctly.

However, for the database I created using Access, pressing
F5 brings up the Macros window. I know this to be
incorrect (and it prevents me from debugging my code) but
I can't determine what I have set up incorrectly. This is
an .mdb file, Access 2000, connecting to Jet 4.0

If you have had this problem - or know what I am doing
wrong - any help would be appreciated.

THX !
 
I *think* it is actually the normal behaviour.

If the cursor is anywhere in a function that does not have
arguments, pressing F5 will run the function. Otherwise,
pressing F5 simply brings up the Macros window.

This shouldn't stop you from effective debugging. You can
simply use Breakpoints and use "Step Into" / F8 to trace
the execution line by line or "Run to Cursor" / Ctrl + F8
or Run Sub/User Form to the next Breakpoint or end of
procedure / F5. Then you also have the Watch and the
Immediate / Debug window.

If you have any Access VBA book, look up the section on
how to use IDE. There are plenty of facilities for
debugging.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top