hi everyone.
I have this code to apply the filter on a form to a report.
In Access97 it worked fine but when I converted it to Access2000 the
report shows all records in the table. What has happened?
this is the code:
strGlobalFilter is a global valiable
if me.filter = "" then
MsgBox "Apply a filter to the form first."
Else
strGlobalFilter = me.filter
DoCmd.OpenRepor t "rptLeads", acViewPreview
End If
in the report's "OnOpen" event:
DoCmd.ApplyFilt er, strGlobalFilter
It shows now all the records
Thanks för any help
/Regards BigOlle 2 1435 ol**@ylm.se wrote: hi everyone. I have this code to apply the filter on a form to a report. In Access97 it worked fine but when I converted it to Access2000 the report shows all records in the table. What has happened?
this is the code: strGlobalFilter is a global valiable if me.filter = "" then MsgBox "Apply a filter to the form first." Else strGlobalFilter = me.filter DoCmd.OpenRepor t "rptLeads", acViewPreview End If
in the report's "OnOpen" event: DoCmd.ApplyFilt er, strGlobalFilter
It shows now all the records Thanks för any help /Regards BigOlle
On form try this:
DoCmd.OpenRepor t "rptLeads", acPreview, , strGlobalFilter
without "OnOpen" event on Report.
It must work!
--
Gox
Hi Thanks a lot.
Now it works perfekt.
I made it work after adding two commas, ( ,, ) after acPreview
DoCmd.OpenRepor t "rptLeads", acPreview, , strGlobalFilter
Super
/Regards BigOlle This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 ACC2K2 (SP-2)
-------------- ---------------------------
|
by: swilson513 |
last post by:
In Access97 I was able to have an advance filter on a form that had a
Like statement so when you applied the filter EACH time it would asked
for the criteria. In 2000 the same filter doesn't asked for the
criteria after the first time you apply it. Is there a beter way of
doing this?
TIA
|
by: Wolfgang |
last post by:
Hi,
I need to timestamp printed records with the printing date. According
to the customer's requests the report must be opened in preview-mode
and the user clicks on the printer button if he really want to have a
hardcopy.
The customer selects the records with a special selection form, where
he can combine up to appr. 20 different criterias, which are combined
to a more or less complex filter string. This string is then written
to the...
|
by: fleece |
last post by:
I set up a form for searching criteria and pass the searching result to a report. On this report there is an unbound text box (=.Filter) and shows the searching criteria. It works fine when searching criteria is NOT NULL. But when Seaching criteria is Null, it will show some incorrect default filter.
I think the problem might be solved by using IIF( Report.filteron, Report.filter, Null). But I don't know how to set Report.filteron=True.
...
|
by: emgallagher |
last post by:
I have a form which lists studies. People can filter the form based
on
details about the study, such as the study type. Currently users
filter via
the right click method.
I would like to be able to have a report that shows just the filtered
records.
The code that I tried which didn't work:
| |
by: Cara Murphy |
last post by:
Hi There!
Hoping you are able to help me with a filtering scenario:
I have created a pop up form (Filter) to filter a report (Open Issues), which currently has a number of combo boxes which apply the filters to the fields in the report.
I would like to use this form to filter the report within a date range (Raised Date From and Raised Date To), using unbound text boxes, without having to specify the criteria within the report's...
|
by: DAHMB |
last post by:
Hi all,
Using Access 2007
I have a report called Sunday School Attendance based on a Query called qryAttendance the query is as follows:
SELECT tblSundaySchoolAttendance.StudentID, tblSundaySchoolAttendance.AttendanceDate, .
FROM tblSundaySchoolAttendance INNER JOIN ON tblSundaySchoolAttendance.StudentID=.StudentID;
|
by: Joelle |
last post by:
Hi everyone,
i am really stack!i need help
I have this report:"RequirementObjects_Report",i have also a multiselect listbox whicg contains a list of products.what i want to do is to filter the above report based on the products that i have selected.
here is my code but it seems that my filter does not work properly and get the entire report back(RequirementObjects_Report)
Private Sub GenerateReport_Click()
Dim var As Variant
Dim strF As...
|
by: franc sutherland |
last post by:
Hello,
I have a report which I filter using the me.filter command in the
OnOpen event.
Me.Filter = "OrderID=" & Forms!variable_form_name!
Me.FilterOn = True
I want to be able to open that report, filtered, from different
forms. How do I carry the name of the current form into the
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |