General information
Category:
Forms & Form designer
>>I am using VFP 3.0.
>>
>>I have two text boxes, one contains the date (ld_date) and the other should contain cdow(ld_date) of the date. It seems to me that this should be quite straight forward to do, but I get an error if I set the control source of the second text box to cdow(ld_date).
>>
>>It seems that I shouldn't have to programtically set the value of the second textbox from the first, since the first testbox should not be aware of the second textbox. The second textbox should be aware of the first.
>>
>>How should this be done?
>>
>>Am I even making sense. :-|
>Evan,
>
>I don't think you can set a ControlSource to an expression. There are two ways to do this. One is to have textbox 1 update textbox 2 in its InteractiveChange or LostFocus event. The other would be to put THIS.Value=CDOW(THISFORM.TextBox1) in the Refresh method of TextBox 2. You'll still have to make sure TextBox 2 gets refreshed after TextBox1 is updated.
Okay, method two is the way to go. A refresh is done when the value in textbox1 has changed. Thanks.
Previous
Next
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