General information
Category:
Forms & Form designer
Hi Alex,
I have had a similiar situation. If I'm not mistaken, you use the MM framework. Assuming that you are using the cTextBoxL class, you could do something like this in the valid of the textbox:
Before your code...
IF This.Parent.IsEmpty()
This.Value = DATE()
ENDIF
Then the rest of your code after.
I have also had an occasion to set a control to a default value. What I have done is in the form Init(), check to see if I am adding a new record or not (by checking the lAddMode property), and then if I am, setting the value of the control in question to the value I want. It seems to work OK.
HTH,
Brian
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only