Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
1:M Grids on Forms (VFP3)
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00063218
Message ID:
00064325
Views:
71
Thanks for your replies. I've managed to get my grid looking really slick, love the sparse feature! However when I open my form I see my parent record and ALL THE CHILD RECORDS, not just those relevant to the parent record.

I can get the relation working from the command window with the following commands:

SELECT TRANSACT
SET RELATION TO transactid INTO Transdet

AND when I look at the relevant(?!) properties of the grid and form I see:

Cursor 1
Alias = "transact"
Database = bkdata.dbc
CursorSource = "transact"
Name = "CURSOR1"

Cursor 2
Alias = "transdet"
Database = bkdata.dbc
CursorSource = "transdet"
Name = "Cursor2"

Relation1
ParentAlias = "transact"
RelationalExpr = "transactid"
ChildAlias = "transdet"
ChildOrder = "transactid"
OneToMany = .T.
Name = "Relation1"

Grid Details
ChildOrder = "TRANSACTID"
LinkMaster = "TRANSACT"
Panel = 1
RecordSource = "TRANSDET"
RecordSourceType = 1
RelationalExpr = "TRANSACTID"
Tag = ""
Name = "grdDetails"

I can't believe this is turning into such a big deal and really really appreciate your help so far. Can you see where I'm still going wrong.

Thanks - Sarah

>>I've read the help text and the manuals but can't get to grips with Grids - can anyone spot where I go wrong.
>>
>>I have a table (chattels) with key ChattelsId and a child table (ChatYear) with ChattelsId and ChatYearId.
>>
>>ChatYear has an index on ChattelsId and I am using this when setting up my grid. The grid seems happy to display the correct number of records but all have the same values.
>
>>Sarah
>
>Sarah, check your LinkMaster, ChildOrder and RelationalExpr values in the grid. You may have one of those set incorrectly. Also, try changing Sparse from .T. to .F. or reverse.
>
>HTH
>Barbara
Sarah King
pcpropertymanager.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform