Results 1 to 3 of 3
  1. #1
    Gray is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    England
    Posts
    16

    Form/SubForm Architecture Model

    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.

  2. #2
    NoellaG's Avatar
    NoellaG is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    830
    Hi,

    Simplest solution in Access 2007/2010: go to the form properties - tab format - and set the default view of your form to "Split form", then set the split form properties as you like.

    greetings
    NG

  3. #3
    Gray is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    England
    Posts
    16
    Hi

    Thanks... I'd heard about the split form idea but was hoping to stay compatible back with 2002 onwards... maybe it's time I re-considered!

    rgds

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Outlook Object Model question - automation
    By yeah in forum Programming
    Replies: 1
    Last Post: 11-23-2010, 02:05 PM
  2. Replies: 6
    Last Post: 11-05-2010, 10:11 AM
  3. Replies: 3
    Last Post: 10-15-2010, 04:23 PM
  4. Replies: 0
    Last Post: 05-09-2010, 08:43 AM
  5. Replies: 4
    Last Post: 04-29-2009, 04:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums