Hi
Access2002/2007
WinXpPro Sp2
I wonder if anyone has any tips/ideas on a form/subform model I've been working on... largely unsuccessfully so far!
I'm trying to keep the Filter and OrderBy parameters of a main and subform synchronised... Why? My main form has custom buttons on it but I want to see ALL the records displayed in datasheet view so, these two aims are not compatible using one form. So..... I added a subform (let's call it the 'primary' subform) which is populated using an identical SQL Select as the main. The mainform navigation buttons move the records along for both (using current event code) which also moves some other linked-subforms along.
All very dandy until applying built-in (right-click) filters and sorts to main and/or primary forms. In order that the navigation buttons make sense, the filter and orderby params need to be identical on both main and 'primary' subform.
Yee gods! Little did I know what I was blundering into.... I've spent a mountain of time trying to do this using the ApplyFilter events. It occurs to me now that using these events is not the way to go. They work in varying sequences and are especially troublesome when clearing down filter fields.. indeed, in certain circumstances, the subfrom ApplyFilter event does not get fired at all.. instantly the two are out of sync.
I wondered if any of you real Access gurus knew of a more advanced way this might be achieved? Using AdvancedFilterSort runcommands, trapping tight-click commands or somesuch?
Maybe it's impossible?
Thanks
P.S. I don't want to use master/child links on my main and 'primary' subform because the datasheet will then only show one record.