Debug mode

P

pierre

Hi all,

i have form that i want to debug.

If i put a breakpoint on a line,
the program stop but i loose the yellow line
and all the variables are reset.
i can't see any values and i cant go step by step

This is not happening on smaller form where
I can break into the code and go step by step
and wath variable changes content.

Is there a reason for that?

Regards, Pierre
 
S

strive4peace

Hi Pierre,

the routine probably got an error before your breakpoint so
the routine is already done

put an error handler in your code

'-------------------------------------
'------------ put this line at top of procedure:
On Error GoTo proc_Error



'... other statements



'------------add these lines to bottom of procedure
proc_Exit:
'if everything executed normally, exit the procedure
Exit sub
'Exit Function -- use if the procedure is a function

proc_Error:
MsgBox Err.Description, , "ERROR " & Err.Number & "
procedurename"
'press F8 to step through lines of code
'and fix problem
'comment next 2 lines after debugged
Stop
Resume

resume proc_Exit

'--------------------------------

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com
 
P

pierre

Thanks for the answer,

I already have error treatment in the code.

The code is in a form and I also have a communication control that is
open on the form.

The program stop at the breakpoint correctly but there is no yellow
line and i cannot step.

Could it be related to the activex com control open?

best regards,
pierre
 
S

strive4peace

Hi Pierre,

if there is no yellow line, then it did not stop at the
breakpoint, it is already done...

set your breakpoint at the top of the routine and step
through to see where it is stopping -- maybe you have some
exit code

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com
 

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