General information
Category:
Coding, syntax & commands
Marcia,
Thanks, it makes some sense but as they say a picture is worth a 1000 words. So if you could give me an example it would help. I will try to apply what you wrote and see where it places me. Thanks for the response.
Jim
>Hi Jim.
>
>>> When the user presses the add button it will append a blank into the database. I want them to stay just in that row and not be able to move up or down in the grid if there is other records. I want them to move to the left or right in the grid on that row and no other row. I hope that this is clear. <<
>
>In that case, the way that I would handle it is to make sure that the grid's RecordSource is table buffered. Then I would add a custom property to the grid and save the recordSource's current record number to the property in the grid's BeforeRowColChange method. Then, in the AfterRowColChange, check to see if grid.nOldRecNo = RECNO(grid.RecordSource). If not, Save RECNO(grid.recordSource) to a local variable called lnRecNo. GO grid.nOldRecNo IN Grid.RecordSource) and check to see if all the record level validation passes. If not, issue a NODEFAULT, otherwise, go back to the record you were originally trying to navigate to (lnRecNo).
>
>Does this make sense? If not, I will try to dig up some code that I use to accomplish this and get back to you with it. I just don't have it handy right.
>
>Marcia
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