Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grid shows recs not related to parent 1

Status
Not open for further replies.

johncook

Programmer
Nov 24, 2002
154
0
0
US
I have a simple one2many form i created with the wizard.

parent (inventories) has primary key on cid
child (inv_dtl) has regular key on cinventories_id

I have run the builder on the grid till blue in the face. It has the correct relationship yet my grid shows ALL recs in the child table no matter what the value in inv_dtl.cinventories_id is.

Thanks,
John
 
Hi John

1. Make sure that you have drawn the inventories.cid into the child table in the DE.. The otherway, it wont work. If you are in doubt, delete the relationship and then redo it.

2. Make sure that the initialy selected ALIAS in the DE is the inventories table.

3. Also make sure that you dont do any SEEK or such commands by code anywhere else, since this could disturb the relationship.

:)

____________________________________________
ramani - (Subramanian.G) :)
When you ask VFP questions, please add VFP version.
 
Hi Ramani,

Well, I tried that over and over with no luck.

It seems to me that I may be missing a filter to say ONLY include records for the current Inventories record. I have no idea where I would put that filter.

Thanks,
John
 
Just a thought, are the 2 indecies of the same type, and size?

To me it looks like the relation is broken (if you can see all the records of the child).

Try to make a new form (not through wizards, and just make 2 grids in the form, nothing else. Get the 2 tables in the form environment.

enter the record source for each table, and run the form.

It should not be a problem.

you do not need to run the builder. this will speed up the process.
 
BeautyLover,

Finally. I have no idea why but it did work.
Thanks a bunch,
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top