Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding New Records In A Grid
Message
From
30/06/1998 14:36:47
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Adding New Records In A Grid
Miscellaneous
Thread ID:
00113051
Message ID:
00113051
Views:
52
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
Next
Reply
Map
View

Click here to load this message in the networking platform