Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving parent record pointer from child table/field
Message
From
05/03/1998 10:26:00
 
 
To
05/03/1998 02:58:42
John Thomason
King Richard Veterinary Centre
Leicester, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00082630
Message ID:
00082698
Views:
27
>I have a form which displays fields from a child table of biochemical kits. Fields such as the chemistry description and number of units in the kit etc are stored in a parent table as a single chemistry can have many individual lot numbers of kits.
>If I use a vcr to move the record pointer in the parent table the child fields displayed are updated of course but because I am interested in seeing individual kit records and set the vcr to move through the kit table records the parent fields don’t change in sync.
>I am looking for a way of moving the record pointer in the parent table to update textboxes on the form which are bound to the parent table when the vcr control is used to move through the kit records. I need the code to be as generic as possible so that it can be built into the vcr class.
>Is anyone able to help.

I am not good at using the dataenviroment and setting relations from the parent to the child. I would in this case set the relation from the child to the parent so that you have a one to one relation rather than a one to many. Then changing the child record would move the parent record pointer. I know this is old fashion but it works.

use myParent in 0 order myKeyField
use myChild in 0 order (order you would like records displayed in)
select myChild
set relation to myKeyField into myParent

This code would be in myForm.Load
Previous
Reply
Map
View

Click here to load this message in the networking platform