>For some reason, when I am relating two tables, the child table is showing non-matching records until I open up the parent table in a Browse window. Since I don't want the end user to BROWSE, can anyone tell me why the relationship isn't taking effect immediately (without Browsing)?
> My code is:
>
>SELECT Child
>SET ORDER TO ChildIndex
>SET RELATION TO ChildField1 INTO GrandChild1,;
> ChildField2 INTO GrandChild2
>
>SELECT Parent
>SET RELATION TO ChildKey INTO Child
>SET SKIP TO Child
>SET ORDER TO ParentIndex
>SEEK ThisForm.KeyValue IN Parent
>
> I have other table relations, but they don't involve the relation between Parent and Child, which is where I'm having the problem. (The other table relations involve the child and grandchildren tables.)
> Since there already is a framework for the project, putting the relationship into the Data Environment is not an easy option. I was having this problem with grids earlier, but I was able to resolve it by programming the data sources, instead of using the Properties window. However, my code isn't working here. Any ideas?
My WAG, after reading the thread so far, is that you may try to Select Parent. That's the only thing that browse would do that you aren't already doing in your code. Try to do that just before the Seek.