Question:
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?
Answer:
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.