>>Wake up you lot and stop this incessant arguing: I've got a problem for you! :-)
>>
>>I've a form based on the COUNTY table. Now each county has a number of DISTRICT and ZONES records, ref'ing it by the county code NUMERIC FK (1-m).
>>
>>On the form there are 2 pages, each with a grid, to show all the zones and districts withing each current county, respectively.
>>
>>In the DE I have the order of both these tables set to their DESC field and nothing in code in the form alters this. I use the old trick of making both the tables the master, and the COUNTY table the child, so that as I skip through the COUNTY table I get the list of each within it automatically
>>
>>Trouble is, the District list is in the correct DESC order but the Zones table is higgledy-piggledy order.
>>
>>Any ideas what's amiss?
>
>"DESC" as descending or description?
>
>And I'm not quite sure what do you mean by master-child here... do you mean the grids' recordsources are zones and districts respectively, and you got the county related into each (additive)? And if so, related via what field?
Thank you (the only one who's answered)
As I said, the DESC (Description) field of each table (not my table design)
Belay what I said aboutn reversing the master [parent] - child order. I though I had but hadn't.
Grid 1 has:
- recordsource = ZONES
- LinkMaster = COUNTY
- ChildOrder = County (FK to COUNTY.Code - PK)
- RelationalExpre = Code
and if we look at the reln. arc's props in the DE:
- ChildAlias = ZONE
- ChildOrder = County
- ParentAlias = COUNTY
- RelationalExpre = Code
Grid 2 has:
- recordsource = DISTRICT
- LinkMaster = COUNTY
- ChildOrder = County (FK to COUNTY.Code - PK)
- RelationalExpre = Code
and if we look at the reln. arc's props in the DE:
- ChildAlias = DISTRICT
- ChildOrder = County
- ParentAlias = COUNTY
- RelationalExpre = Code
So they both have similar key names and same relnship with COUNTY table. I have them both ordered on their DESC fields, so the descs appear in the grid in alphbetical order. Now this works (or seems to - maybe just luck) for the DISTRICT table but the ZONES table appears in random order, but the underlying table in the DE shows them to be in County (FK) order.
Now I realise this is the ChildOrder, but when I set the Order prop, in the DE, to DESC I assumed the table would display in that order but I find the County FK is overriding.
Maybe I'll have to make a composite key of County+Desc, but that won't have a matching parent index in the COUNTY table./
IOW I want to display all the ZONEs for a particular COUNTY, but I want those zones in the grid, in their DESCription field order. I think it IS just luck that the DISTRICT table is in the right order.
Cheers
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.