Make sure that your selected alias is always the jvhdr eventhough you're inserting record to the child table. Remember, you're dealing with one-to-many relationship table design.
Select jvdtl
Insert blah...blah
Select jvhdr
Thisform.Refresh()
tia
>The form has two tables jvhdr and jvdtl with private data session.
>The jvhdr has only two fields jvdate and jvno.
>the grid has jvdtl as record source and the properties set as linked to jvhdr.
>I have programmed rightclick on grid to enter new record in grid control.
>The form navigates properly as related with toolbar. But when I try to add new voucher after rightclick the new record shows in grid and the data can be entered but when the next record is inserted the first record just vanishes.
>If I go to data session window the records are present (with negative record nos. as table buffering is on).
>When I activate other form and come back the record appears in grid.
>I have rewritten the form twice.
>I even triggered the form.refresh method but to no use.
>I have similar forms working properly in which only the parent file has more fields.
>
>Rajesh
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net
CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."