Information générale
Catégorie:
Codage, syntaxe et commandes
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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement