Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One-Many grid control?
Message
From
09/11/1997 02:37:21
 
 
To
08/11/1997 04:58:43
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00059057
Message ID:
00059151
Views:
27
>I would like to know how most of you here implement one-many form. I am curious because when I use the most direct way, I encounter a whole chunk of problems which I have not seen others voice out besides myself. I begin to wonder if the way I thought to be most direct is wrong.
>
>I use DE and buffering. My main problem is in the replacement of foreign key in the detail table and the controlling of the detail table grid pointer. I like the traditional way of having a spreadsheet-like details grid where people can just use arrow key and enter key to move around the grid. However, I never seem to get everything right after nearly A YEAR of hardwork using VFP.
>
>Can someone tell me how to replace the foreign key and how to refresh the grid so that everything works well?

Shih,
I also use grids to enter new records directly. All you have to remember is to make sure you set the foreign key to the appropriate value (usually, referancing primary key value of "one" in one-many) WHEN you are adding a new child/grid record. It doesn't matter what style you use to add a new record, as long as you remember to do this, it will work w/o any problems.

For example, if you're clicking a toolbar/command button to add a new child/grid record, in the INSERT INTO command add the FK value. Or if you're handling adding new recs in the grid (like downarrow keypress while on the last rec in the grid) just make sure you add the FK value.

HTH
John.
It's "my" world. You're just living in it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform