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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debug will not break when expression has changed

Status
Not open for further replies.

KoenPiller

Programmer
Apr 4, 2001
270
NL
Hi,

Consider following scenario: I have myForm with a buttonclass like the wizBtns.vcx. When activating the cmd Append/Save Button I am ‘appending’ a blank reccord (-1), activating this button again and a new psysical record is added to the table. Nothing special always works o.k.
Untill today, I come to a situation where records are never appended the last one is editted. Somewhere a nasty mistake. Now when I set a break in debug on when recno()<>-1 , it will not break. You can clearly observe in Watch that recno()=-1 on leaving the wizBtns but on next step (MyForm.txtBox.GotFocus) Recno()<>-1. Can't figure out which line makes the append blank to be changed. Any other idea where I should look for the error?
FoxPro 6.0 or 9.0 (Beta) no difference both same situation.

Thanks for helping me out.

Koen
 
Koen,

I suggest you include the table alias in RECNO(). In other words, the breakpoint would be:

recno("MyTable")<>-1

Apart from that, the best I can suggest is that you don't get too hung up on finding out why the breakpoint doesn't trigger. Instead, focus on the actual error itself.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike,

That was exactly I was doing: trying to find out why I didnot append, thought I could use the Debug to locate my mistake. Your solution did not bring the answer, neither a solution I found in an old FoxProAdvisor about using a label as a debug-aid tool. Anyhow I deleted the form and started down from the scratch, it now works as it should!
Thanks for moral support.

Koen

[2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top