423,491 Members | 2,205 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,491 IT Pros & Developers. It's quick & easy.

Remove filter does not work...

P: n/a
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!masterform!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.Filter = ""
Me.Recordset.Requery
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
Ma***********@FirstByte.net

Feb 8 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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!masterform!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.Filter = ""
Me.Recordset.Requery
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
Ma***********@FirstByte.net

-
I usually do something like
If IsNull(Me.TextBoxField) Then
strFilter = ""
Else
strFilter = "Billed = True"
Endif
Forms!MainFormName!SubFormName.Form.Filter = strFilter
'turn the filter on or off
Forms!MainFormName!SubFormName.Form.FilterOn = (strFilter "")

PPG
http://www.youtube.com/watch?v=7DiTuLoG4ss
Feb 8 '08 #2

P: n/a
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!masterform!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.Filter = ""
Me.Recordset.Requery
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...@FirstByte.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.RecordSource = strSubformXSQL
SubformX.Form.Refresh
SubformX.Form.Repaint

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
CD********@FortuneJames.com
Feb 8 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.