>>>I need to do a valid on a row change in a grid. I have two date fields in a record and I need to make sure the 2nd date is not before the 1st date. As it is now, if the user enters a bad date in the 1st column he has to enter a bad date in the 2nd column in order to get back to the 1st column. Any way to test both dates before leaving the row but allow the user to get to both columns? BeforeRowColumnChange() only uses the column number, not the row/record.
>>
>>See
Re: Validation for Grid Thread #
630571 Message #
630572 and also try to search on "valid grid" and Marcia Akins ID. I found several good threads, where she discussed this issue.
>
>Nadya, many thanks. Looks like just what I need.
This is my general way.
It goes back to VFP 6 - there may be an easier way, now.
Create a validation function or stored procedure.
Say this is lValid().
Modify Structure.
Go to Table - Record validation - Rule.
Enter lValid().
This should pick up changing rows in the grid.
BUT...
It doesn't seem to pick up clicking outside the grid.
SO...
Call lValid() from the Grid.Valid method.
This is simplified.
And sometimes both the Record Validation Rule and the Grid.Valid will fire.
But better twice than none!
Ask me any questions.
- Andy Rice
San Diego, CA