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

form onClick OpenReport vs. report onOpen applyFilter

I have a continuous form with a list of items from a table. One of the
fields in the table is "print". this allows the user to select items from
the list on the form for printing in a report. on that form i have a button
with the following onclick event:

DoCmd.OpenReport "rptCustomerReport", acViewPreview, , "Print = True"

This opens the report "rptCustomerReport" and shows all of the records that
the user had checked of on the form. If no records are checked, the report
opens with one blank record. Exactly as I want it to work.

I am trying to set up the report so that it filters for these records in the
onopen event of the report instead of from the form. i put the following
code in the onOpen event of the report:

DoCmd.ApplyFilter , Forms!frmPlantListBot!PrintCheck = True

If no records are selected on the form (which is open) then one blank record
is displayed, same as before. However, if I check of any of the boxes on the
form (control is named 'printCheck' on the form, controlsource is 'print'
from the underlying table) then all of the records show up on the report,
not just the ones that have been checked off.

what am i missing?
Sep 8 '06 #1
1 4754
take a look at the Filter Property topic in VBA Help; that may work for you,
rather than the ApplyFilter command.

hth
"Jimmy Stewart" <no**@none.comwrote in message
news:oI*********************@fe04.news.easynews.co m...
I have a continuous form with a list of items from a table. One of the
fields in the table is "print". this allows the user to select items from
the list on the form for printing in a report. on that form i have a
button
with the following onclick event:

DoCmd.OpenReport "rptCustomerReport", acViewPreview, , "Print = True"

This opens the report "rptCustomerReport" and shows all of the records
that
the user had checked of on the form. If no records are checked, the report
opens with one blank record. Exactly as I want it to work.

I am trying to set up the report so that it filters for these records in
the
onopen event of the report instead of from the form. i put the following
code in the onOpen event of the report:

DoCmd.ApplyFilter , Forms!frmPlantListBot!PrintCheck = True

If no records are selected on the form (which is open) then one blank
record
is displayed, same as before. However, if I check of any of the boxes on
the
form (control is named 'printCheck' on the form, controlsource is 'print'
from the underlying table) then all of the records show up on the report,
not just the ones that have been checked off.

what am i missing?


Sep 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dalan | last post by:
The problem to resolve should be pretty easy for someone. I have a main form which contains a combo box to lookup various vendors. Have several reports for the vendors, but it is print all or...
1
by: Dalan | last post by:
I designed a dialog box with a combo to select individual vendors from a form and its related data for print ouput. Though the dialog box seems to work okay, I apparently do not have the filtering...
1
by: Andrew | last post by:
Hi All: I am using Access2000 and I find that the command to open an Access report in preview mode is very slow: DoCmd.OpenReport rptABC, acViewPreview, "", "" The scenario is this: - The...
1
by: SamBenjamin | last post by:
Is it possible to incorporate a search into a form using a text field for the search word(s) and a command button to start the search, returning results that don't exactly match.. For example...
8
by: | last post by:
hi, i have a form on which a user can choose specific criteria such as dates etc, in order to filter the report that is called from the form. i do this by using the Where section of the...
4
by: Jimmy | last post by:
Quick question for you. I'm using a small form for users to input a range of dates for a report (similar to the date range forms used in MS templates) that has an ok and a cancel button. How can I...
5
by: Gumbyu | last post by:
Hello all, I have been working on this issue for about a week and still cannot get anything to group or sort. At this point, I just want to be able to group a report by using a 'checkbox' on a form....
6
by: martin DH | last post by:
**Urgent Need** I'll throw out the basics and any assistance is very, very, very much appreciated! Access 2003 on XP On a form (frmMain) is an option group of check boxes (ReportFrame) from...
3
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.