Remove filter does not work...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts

  • CDMAPoster@fortunejames.com
    Guest replied
    Re: Remove filter does not work...

    On Feb 8, 3:16 pm, "Matthew Wells" <Matthew.We...@ FirstByte.net>
    wrote:
    Hi there.
    >
    I am a programmer for a living, but this problem has my whole team stumped..
    >
    I have a subform based on a query.  I'm not using the
    "LinkMaster/ChildFields" properties ( I have my reasons ).  The ssbform's
    query has a criteria for forms!masterfor m!Keyfield.  This works fine on
    open.  I have an options group with two options - True or All.  Selecting
    True adds a filter to the subform's fitler property "Billed = True".  That
    works fine, but when I remove the filter, I don't get all my records back.
    There are 264 records - 10 are billed. , but I only get 101 back when I
    remove the filter.  I've tried every combination of
    >
    Me.Filter = ""
    Me.Fitler = False
    Me.Recordset.Fi lter = ""
    Me.Recordset.Re query
    Me.Requery
    >
    Somethmes I get 201.  There are no hidden parameters in the query.  I've
    tried using Master/Child fields, but for some reason, Access crashes when I
    use it. The subform is not filtered anywhere else but in this procedure.
    Can anyone help???
    >
    Thanks.
    >
    Matthew Wells
    Matthew.We...@F irstByte.net
    Since you have freed yourself from the Link Child Fields/Link Master
    Fields properties, try changing the entire RecordSource of the subform
    dynamically using WHERE instead of using the Filter property. For
    example, code behind frmX with frmSubX in the SubformX control:

    SubformX.Form.R ecordSource = strSubformXSQL
    SubformX.Form.R efresh
    SubformX.Form.R epaint

    The Repaint might be overkill but those lines work well for me.
    Perhaps changing the RecordSource will enable you to locate the
    problem in case the FilterOn property suggested by Salad doesn't solve
    the problem. Even without the FilterOn property, the results you are
    getting seem unexplainable.

    BTW, did the NG ever determine if a recordsource using WHERE versus a
    larger result set utilizing a filter produces less network traffic?

    James A. Fortune
    CDMAPoster@Fort uneJames.com

    Leave a comment:


  • Salad
    Guest replied
    Re: Remove filter does not work...

    Matthew Wells wrote:
    Hi there.
    >
    I am a programmer for a living, but this problem has my whole team stumped.
    >
    I have a subform based on a query. I'm not using the
    "LinkMaster/ChildFields" properties ( I have my reasons ). The ssbform's
    query has a criteria for forms!masterfor m!Keyfield. This works fine on
    open. I have an options group with two options - True or All. Selecting
    True adds a filter to the subform's fitler property "Billed = True". That
    works fine, but when I remove the filter, I don't get all my records back.
    There are 264 records - 10 are billed. , but I only get 101 back when I
    remove the filter. I've tried every combination of
    >
    Me.Filter = ""
    Me.Fitler = False
    Me.Recordset.Fi lter = ""
    Me.Recordset.Re query
    Me.Requery
    >
    Somethmes I get 201. There are no hidden parameters in the query. I've
    tried using Master/Child fields, but for some reason, Access crashes when I
    use it. The subform is not filtered anywhere else but in this procedure.
    Can anyone help???
    >
    Thanks.
    >
    Matthew Wells
    Matthew.Wells@F irstByte.net
    >
    -
    >
    I usually do something like
    If IsNull(Me.TextB oxField) Then
    strFilter = ""
    Else
    strFilter = "Billed = True"
    Endif
    Forms!MainFormN ame!SubFormName .Form.Filter = strFilter
    'turn the filter on or off
    Forms!MainFormN ame!SubFormName .Form.FilterOn = (strFilter "")

    PPG

    Leave a comment:


  • Matthew Wells
    Guest started a topic Remove filter does not work...

    Remove filter does not work...

    Hi there.

    I am a programmer for a living, but this problem has my whole team stumped.

    I have a subform based on a query. I'm not using the
    "LinkMaster/ChildFields" properties ( I have my reasons ). The ssbform's
    query has a criteria for forms!masterfor m!Keyfield. This works fine on
    open. I have an options group with two options - True or All. Selecting
    True adds a filter to the subform's fitler property "Billed = True". That
    works fine, but when I remove the filter, I don't get all my records back.
    There are 264 records - 10 are billed. , but I only get 101 back when I
    remove the filter. I've tried every combination of

    Me.Filter = ""
    Me.Fitler = False
    Me.Recordset.Fi lter = ""
    Me.Recordset.Re query
    Me.Requery

    Somethmes I get 201. There are no hidden parameters in the query. I've
    tried using Master/Child fields, but for some reason, Access crashes when I
    use it. The subform is not filtered anywhere else but in this procedure.
    Can anyone help???

    Thanks.

    Matthew Wells
    Matthew.Wells@F irstByte.net



Working...