Hi Enry
The forms that I have developed have always used labels, comboboxes,
radio buttons, editboxes to display the information about parent table.
The child table would always be displayed in a single grid. My forms were
developed in this way because I started out by using the wizards to create
a one-to-many form as a learning aid. The wizard used a single grid to
display records in the child table. Of course the wizard used the wizstyle
class, so all objects on the form were members of that class.
You might run some tests. If you are using the load event to select
your parent and child tables and set indexes and the relation
between the parent and child, do a "set step on" immediately after
completing this step. Then call up the command window and select
the parent table. Browse down the parent table to a unique primary key.
Then close the browse window and select the child table and browse it.
Make sure the record pointer is on the first record in the child table
that corresponds to the unique primary key that was selected in the parent
table. If it is then the parents unique key has been properly related
into the child table.
If you are using the wizstyle class, I would assume that you have placed
the txtbtns object on your form to navigate through the tables. The
txtbtns object has a ton of code in it to add/save edit/revert and refresh
objects that are members of the wizstyle class. I do know whether
the txtbtns object has code in it to handle a parent table within one grid
and a child table within a second grid, but I will assume at this point
it does. If not someone will let us know. Open the property window
and check the classlibrary property to make sure both grids are members
of the wizstyle class. Also, in the child's grid make sure the Linkmaster
property holds the alias name of the parent table that drives the child
tables. Make sure the recordsourcetype of both girds is set to "alias"
and the recordsource of each grid hold the alias name of the table to
be displayed. Below is code extracted from the load event of one of
my one-to-many forms:
Set Exclusive Off
Set Multilocks On
Select arcur
Set Order To Tag Main
=CursorSetProp("Buffering",5,"arcur")
Select clint
Set Order To Tag clientno
=CursorSetProp("Buffering",5,"clint")
Set Relation To Str(clientno,8,0) Into arcur