473,386 Members | 1,886 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,386 software developers and data experts.

Handling filters in Ms Access 2000 forms

Hi,

I am working on a form which currently does not show data after it has opened.

but i can see the data only when i remove the filters from the form, after opening the form

form displays the componet list which it get from the query.

the problem is

that i have not introduced any kind of filters in the form
in fact in on load and on open properties i inserted
Me.filter = ""

but still i am facing problem with the filters

can you please help me in this regard

thanking you
Oct 20 '06 #1
7 2564
MMcCarthy
14,534 Expert Mod 8TB
Try removing

Me.filter = ""


If there is a filter being generated by a query which is the record source of the form this would be overwriting it.
Oct 20 '06 #2
I am inserted the

Me.filter = " "

in the Private Sub Form_Load()
Private Sub Form_Open(Cancel As Integer)

but still i am facing the same problem

and also the form includes a sub

Private Sub Btn_Filter_off_Click()
fi_cnt = fi_cnt + 1
Me.Filter = ""
Me.Btn_Filter_off.Caption = "Filter_off " & fi_cnt
Me.FilterOn = False
End Sub

in fact of all this

still i am unable to see the data in the form

so please help me in this regard

thanking you,
Oct 20 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
How are you loading the filter?

===========================

If you are not loading a filter don't turn it off

Remove

Me.filter = " "

From

Private Sub Form_Load()
Private Sub Form_Open(Cancel As Integer)

Remove

Private Sub Btn_Filter_off_Click()
fi_cnt = fi_cnt + 1
Me.Filter = ""
Me.Btn_Filter_off.Caption = "Filter_off " & fi_cnt
Me.FilterOn = False
End Sub
Oct 20 '06 #4
How are you loading the filter?

===========================

If you are not loading a filter don't turn it off

Remove

Me.filter = " "

From

Private Sub Form_Load()
Private Sub Form_Open(Cancel As Integer)

Remove

Private Sub Btn_Filter_off_Click()
fi_cnt = fi_cnt + 1
Me.Filter = ""
Me.Btn_Filter_off.Caption = "Filter_off " & fi_cnt
Me.FilterOn = False
End Sub



I removed all filter code from the form

but still i can not see the data in the form

this form displays the list for componets
which it collects from this query


Private Sub Query_Switch()
Dim the_query As String
the_query = _
"SELECT R35_PFUS_Annex.*, R21Components.ComponentName, " & _
" R21Components.ComponentCount, R21Components.Remark, " & _
" R21Components.PFUS_Document, " & _
" R21Components.SAP_Info_01, R21Components.Valid_Entry, " & _
" R21Components.Marker_for_Selection " & _
" FROM R21Components INNER JOIN R35_PFUS_Annex " & _
" ON R21Components.R21LfdNr = R35_PFUS_Annex.R21LfdNr "
If False = f_query_with_ps_applied Then
the_query = the_query & _
" WHERE (((R35_PFUS_Annex.PFUS_Dok_No) Like 'PS5345*')) "
End If

f_query_with_ps_applied = Not f_query_with_ps_applied
the_query = the_query & " ORDER BY R35_PFUS_Annex.PFUS_Dok_No;"
some_msg = "the Query is: '" & the_query & "'"

Me.RecordSource = the_query
End sub

so please help out

thanking you,
Oct 20 '06 #5
MMcCarthy
14,534 Expert Mod 8TB
To establish if the problem is in your query.

Put the query in a query window and run it. Do all the expected records show?
Oct 20 '06 #6
To establish if the problem is in your query.

Put the query in a query window and run it. Do all the expected records show?

can you please tell me how to use the query window
Oct 20 '06 #7
MMcCarthy
14,534 Expert Mod 8TB
All I meant by this is open a new access query and go to SQL view. Put in your sql code (without the line breaks).



can you please tell me how to use the query window
Oct 20 '06 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: dananrg | last post by:
I've created a small company database where the tables reside in a SQL Server database. I'm using Access 2000 forms for a front end. I've got a System DSN set-up to SQL Server and am using links...
5
by: MGFoster | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've converted an ACC97 .mdb file to an ACC2K2 .adp. A report that worked in ACC97 doesn't work in ACC2K2. Report setup: ACC97 ...
1
by: J | last post by:
Hi, Ive got 3 forms, (a subform within a subform within a form) and when I refresh the outermost form, Access closes and offers to send an error report. The forms worked fine a few weeks ago,...
2
by: CSDunn | last post by:
Hello, I need some assistance with error handling in an Access 2003 Project form. The project is has a data source connection to a SQL Server 2000 database. The main form is named...
47
by: ship | last post by:
Hi We need some advice: We are thinking of upgrading our Access database from Access 2000 to Access 2004. How stable is MS Office 2003? (particularly Access 2003). We are just a small...
12
by: scsharma | last post by:
Hi, I am working on creating a webapplication and my design calls for creating main webform which will have menu bar on left hand side and a IFrame which will contain all the forms that are shown...
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
0
by: MutantTrafficCop | last post by:
I am beginning to change an Access front-end so that it connects to an SQL server version of the db (that I have upsized from an .mdb). I am using an Access 2000 Project and ADO 2.6 to connect to...
0
by: Lysander | last post by:
Thought I would give something back with a few articles. This article is a bit of code to add error handling. When I have time, I want to write articles on multilingual databases, and Access...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.