Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fooling the valid event of a control
Message
From
23/05/2001 18:38:16
Gerald McKinsey
Keystone Consulting Services, Inc.
Yorktown, Indiana, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00510628
Message ID:
00510645
Views:
15
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
Map
View

Click here to load this message in the networking platform