Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Adding New Records In A Grid
I'm trying to add new records in a grid using the down arrow. I have put the following code in the KeyPress method of my Grid1.Column1.TextBox
nKeyCode = InKey()
If nKeyCode = 24
Insert Into GridTable(parent_id, otherparent_id) Values (Parent.parent_id, OtherParent.otherparent_id)
ThisForm.Refresh
EndIf
A new record is added to the GridTable but the parent_id fields are not entered therefore the relationship isn't preserved. How can I get a new record to be added with the apporpriate parent_id's using the down arrow? When I use similar coding with an add button I have no problems. BTW I do have the AddNew Method of the grid set to true. Am I not using the KeyPress method correctly?
TIA
--lincoln
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