Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jan 2001
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ApplyFilter Event

    On My main form, I have 6 subforms. All are opened, yet only 1 is visible at a time. The user can select which subform to view by choosing its name from an option group.

    If the user selects a specific value in one subform and filters it using the FilterBySelection button, all is fine until a different subform is selected. The filter, of course does not apply, automatically, to the other 5 subforms.

    I have captured the Me.Filter value and stored it in a hidden textbox on the main form. And I have tried to apply that same filter to each subform using their respective OnEnter events. The process works, almost!

    What I had not planned on was when I set a subforms Filter property programatically, the subform's ApplyFilter event fires. This causes a problem because it constantly modifies the value stored in that hidden textbox, effectively destroying the filter value text I am referring to.

    First Question (finally!): Is the ApplyFilter event really supposed to fire when the Filter property is set via code?

    Second Question: Can anyone think of a better way to accomplish what I am trying to do?

    Thanks for your patience. And I look forward to all the creative answers!

    Regards,

    Rich P. <img src=/S/headthrob.gif border=0 alt=headthrob width=15 height=15>

  2. #2
    Star Lounger
    Join Date
    Feb 2001
    Location
    Wirral, Merseyside, Merseyside, England
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ApplyFilter Event

    I'm not sure about the applyfilter event but it sounds like its working as expected. You might try a lost focus action to reset the records as you leave the subform.

    I would do the 6 subforms as tab controls I think it would be a lot simpler than your method.

  3. #3
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    NYC,USA,Earth
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ApplyFilter Event

    My understanding of the applyfilter event is that it applies whenever you click on the apply filter button and its corresponding menu command. One way you can test event timing is by placing message box statements in the events you are interested in.

    As far as the design I'd have to agree with Caz. I have an application with 3 subforms on one main form. I use a 3 paged tab control with a different subform on each page and the users love it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •