Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the best place to put field default info
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00408749
Message ID:
00409033
Views:
18
>In the dbc, you can enter a default value, for example, DATE() for a date field.
>
>However, in Mere Mortals, I have a form based on a veiw. When I add a record, it does not show the default values until after the record is saved.
>
>How do I show the default values during the original data entry?
>
>Should I add code to the BizObj during the add new which which sets the value textbox?
>
>Have the value set by the textbox itself?
>
>Should I find another line of work? <g>
>
>Greg

Another idea would be to put any defaults in the ONNEW() method of the BizObj. That way you maintain the defaults in one area and not have them get lost in the view itself. The ONNEW method is used to set the primary field ID, however you could use it also to set any default values. Make sure though you first code DODEFAULT so that you don't overwrite the inheritated code from the parent class.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform