Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Visual FoxPro
Expertise: Beginner
Jun 1, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

InteractiveChange in Grid

I have a column in a grid that is of the data type date. In the InteractiveChange event, I have a code that takes the value entered in the grid cell and moves it to an array. Since the column is defined to hold dates, every time I enter a keystroke, the InteractiveChange fires. Because the event fires before I complete typing the date, I get an invalid date error.

Is there another place I can put my code so that the code is executed after I have completed typing the whole date?

As you are finding out, the InteractiveChange event fires whenever the value of the controlsource of a control changes. You need to use the Valid method of the control in the column. The Valid method fires whenever you attempt to leave a control and allows you to validate data and event to prevent leaving the control.

Try putting the code that adds to the array into the Valid method.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date