Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where is a default Field value coming from.
Message
From
13/01/2003 17:26:26
Sasha Burkich
Senior Systems Analyst
British Columbia, Canada
 
 
To
09/01/2003 15:11:38
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00739981
Message ID:
00741218
Views:
22
Hi Steve,

try this:

set a breakpoint in a debugger with the type: Break when expression has changed. (MainMenu/Tools/Debugger/Tools/BreakPoints

For expression put something like THISFORM.FCKEY.Value or if ControlSource is set for this field try that too. Don't forget to click on Add button.

That way, whenever the value of that textbox changes, you'll get a nice popup window and after you click on OK, you'll find yourself in the debugger. Just look at the Call Stack window and see who's calling who and why :) Try clicking on the different lines in the Call Stack window and watch the code in the Trace window.

I'm sure you'll figure it out.

I'll just give it a guess where that code is (the code that's setting the default value). You've said that you went through the classes and the programs and you didn't see it:

If the controlsource for that textbox is comming from the view, try going to the database container, that view's definition (Modify, Properties (On the Fields Tab)), Set the Field to the one you're interested in and look at Default value textbox.

HTH,

Sasha



>I am trying to make sense of some code that was written by my predacessor here. He is no longer with the company.
>
>I have a form with a table in the DE. When You click new on the codemine toolbar a default value is filled in for one of the fields. I need to find where that default value is coming from. Sounds simple.
>
>It is not in the form. There is no custom code in the form. In fact, I placed the table on a new form with a couple textbox controls and the default value appeared when I clicked new.
>
>Similarly it is not on the cmdatamanager class.
>
>So I began looking at the database. In the table designer, the default value box is blank.
>
>If I just browse the table directly and add a record it just adds a blank record without the default value. So that confirms that it is not happening in the database.
>
>The default value is getting filled in when the table is in a data form. It is not coming from any inherited code of the form or data manager because I went all the way back to the codemine base classes and it still filled in the default value.
>
>There has to be someplace else that this is getting defined.
>Unfortunately, I'm not that familiar with the debugger, any tips on using it to step through the code of a form.
Sasha Burkich
Consultant
Victoria, BC
Previous
Reply
Map
View

Click here to load this message in the networking platform