Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One to Many Relations or Not?
Message
 
To
05/11/1997 15:42:10
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00058472
Message ID:
00058531
Views:
32
>Hi All!
>
>I've got a pageframe with 3 pages on it. Page 1 contains info from my parent table "SYSTEM", Pages 2 & 3 contain info from my child table "FEATURES".
>
>My Data Environment for this form contains these two tables with a relationship line joining the two based on systemid. I originally created the relationship with the "OneToMany" property set to True since there are occasions when there are several child records that relate to one parent record.
>
>All seems to work fine, except that when the user is on Page 1 and is using the navigations buttons to advance to the next/previous SYSTEM record it requires 2 clicks to go from SYSTEM record 2 to SYSTEM record 3. I've figured out that this is because there are 2 child records (in FEATURES) for parent record #2 so it's cycling through both to get to parent record #3. I know this, but I envision confusion for my users.
>
>If I turn off OneToMany in my relationship, there's no extra "Next" needed to go from 2 to 3, but then I miss the 2nd child record for parent record 2 on my Pages 2 and 3.
>
>Any ideas on how to handle this???
>
>MTIA!!!
>Mandy

Hi Mandy, how's New York?

Like Edward I prefer not to use relationships in forms. I set an 'active dbf' for each page and the Navigation buttons are set to respond to the active dbf. When I switch from Page 1 to Page 2, I do a SEEK on the Primary Key of the parent table, and store that key to another form property. The navigation buttons (for the child table) won't 'see' a record that doesn't have the right key value.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform