473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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!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
2 4178
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Robin Cull | last post by:
Imagine I have a dict looking something like this: myDict = {"key 1": , "key 2": , "key 3": , "key 4": } That is, a set of keys which have a variable length list of associated values after...
163
by: Shiperton Henethe | last post by:
Hi Know any good utilities to help me strip out the tags that Microsoft Excel 2002 leaved behind when you try and export an HTML format file? This is driving me NUTS. And really makes me...
0
by: Mark Payne | last post by:
Gudday, I have an Access 2000 database which I am using as a phone directory of residents in the hostel where I work. The front end for this directory is a form with a text box (the search name...
2
by: DD | last post by:
I have a command button that applies a filter by customer name, i want a Cmd Button to remove the filter, Access does not supply one can anyone help. Regards DD
7
by: damjanu | last post by:
Hi All; I need little help. I have a datasheet form. I allow user to do 'filter by selection'. My form contains a column with values. As user changes selections, I want to calculate totals....
8
by: dick | last post by:
I am just trying to print/report the results of a "filter by selection" which is done by right-clicking a form, filling in values, and "applying the filter." I have searched the newsgroups, and...
2
by: Tim Marshall | last post by:
The following is happening in two instances in A2003. The one I s\describe is the easiest one. Theme controls and autocorrupt have been turned off long ago. An unbound main form with a list...
0
by: Jonas | last post by:
Hi! I'm working with an ASP.NET web site that needs to conform with XHTML 1.0 Transitional and got an ASP.NET HtmlInputButton which automatically adds the attribute language="javascript" which...
2
by: AAJ | last post by:
I know this sounds nuts, but how do I remove the following filter from a Object Datasource that looks at my business layer... ODSDefaultUserProfiles.FilterExpression = "AllowedWebPage = '" +...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.