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

How to filter print in report?

180 100+
I just want to print only the record I selected, the attached file is the sample program. I have table name: tb1, form name: printrecord, report name: empreport
In tb1 I have 7 records, I just want to know what command in a button or combo box that I can print for example the records that contains Eric, Ariel and Mark?
How about if I have one hundred records and I want to print only the 92 and 95-100 records. How can I do this?
Dec 11 '12 #1
3 2312
Seth Schrock
2,965 Expert 2GB
If you are needing to be able to select multiple values, then you will need to use a list box and set its multi select property to either simple or extended. I'm guessing that you will only need simple.

Now, here is a link that will tell you how to get the values that you have selected and then use those to filter the report: Use a multi-select list box to filter a report
Dec 11 '12 #2
NeoPa
32,556 Expert Mod 16PB
Your question doesn't include any table structure, so it's very vague, but nevertheless much bettar than many previous ones, so I'm seeing this as progress nevertheless.

You need to open the report with the criteria you have determined. See the Help page for parameters for DoCmd.OpenReport() and how to call it so as to filter the report.

Formulating a string to pass as the WhereCriteria parameter is where the complication lies. You may need to be more specific with your question, as what you have isn't too clear. If you have a single field that you want to check for these exact values, then you will need to formulate a string that ends up something like :
Expand|Select|Wrap|Line Numbers
  1. [FieldName] In('Eric','Arial','Mark')
How you design a form to allow you to do that might be a little fiddly.

If you need these matches to use wildcards at all, then this approach will not work. Instead, you will need to formulate a string like :
Expand|Select|Wrap|Line Numbers
  1. ([FieldName] Like 'Eric*') OR ([FieldName] Like 'Arial*') OR ([FieldName] Like 'Mark*')
For more on filtering and building up workable criteria strings see Example Filtering on a Form.
Dec 11 '12 #3
eneyardi
180 100+
Thank you for your reply, I decided to use the layout view of the report and filter the ID field and it works.
Dec 26 '12 #4

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

Similar topics

0
by: Michael Dekson | last post by:
Access 97. I make a report and I want first to see report and then print report without type CONTROL + P. Can I make some button or can I see print button in toolbar meny. Thanks
2
by: ChadDiesel | last post by:
Hello, I have a form and subform with their tables linked by a field called Load_ID. I have a button on my subform that prints just the items listed on that particular subform (looking at...
5
by: Tony Dong | last post by:
Hi there, I am newer for dot net I want to make a report and then print it, the report may include images and text, how can I do that, any one can give me a suggestion? I know how to...
30
by: ljungers | last post by:
Anyone have an idea how I can filter a report that I'm outputting to Word. Using the following 2 Command to print and output to word. The strWhere is a list of selected items/rows to print, and...
1
by: thh108688 | last post by:
Hi All, Is anyone know how to do a print report based on my current record. What i would like to get is once i have entered all the value in the form, when i hit the print button, all the value...
2
by: felicia | last post by:
Can anyone help me on How to use Data Report in VB and how to print report? I hope i can generate the Data Report without Data Environment because I am not fammiliar with it. Simple adodb or adodc...
4
by: Fran | last post by:
I recently tried to use code for "Use a multi-select list box to filter a report" from Allen Browne in my database. I was able to add the code and adapt it to my needs, however I am getting an...
3
by: Gord | last post by:
I'm trying to filter a report with a date in VB code. If I type an actual date bracketed with the pound symbol (i.e. #3-Jul-08#) I can get the filter to work. I can't seem to get it to work by...
1
by: abil | last post by:
i've already build a program that contain all the price, the change given back to the customer but i dun have no idea which function i should use to do program print report... #include <cstdlib>...
0
by: husin | last post by:
Hi all, It seems like every one here a is a VB person :P But I was wondering, how do I filter crystal report by TextBoxes and ListBoxes on a single page, all coming from SQL database. Like,...
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:
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
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
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,...
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
tracyyun
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...

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.