Hiding records on reports by checkbox on form

Hi, I'm in the proccess of buliding a new database. Its purpose is to store
various organisation contact details and then to produce reports based on
this that can be printed onto sticky labels. This much or basically finished.
However, we naturally don't want to print the whole database every time, so
I'm using a checkbox on the interface form that will filter the report so
that only checked records are prepared for printing. Can anyone tell what
code I need to use to do this, and where? I've tried various methods, but
nothing seems to work. I'm using accesss 2003 by the way. Thanks.

0
oliaccount
4/19/2007 10:11:49 AM
access.reports 4434 articles. 0 followers. Follow

2 Replies
1920 Views

Similar Articles

[PageSpeed] 48

Presumably you added a yes/no field to your table, so you can check the box 
for the records to print?

If so, create a query using this table.
In the Criteria row under your yes/no field, enter:
    True
The query shows only those records where the box is checked.

Now set the RecordSource property of your report to the name of this query.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"oliaccount" <u33480@uwe> wrote in message
news:70ee55b9e4bd8@uwe...
> Hi, I'm in the proccess of buliding a new database. Its purpose is to 
> store
> various organisation contact details and then to produce reports based on
> this that can be printed onto sticky labels. This much or basically 
> finished.
> However, we naturally don't want to print the whole database every time, 
> so
> I'm using a checkbox on the interface form that will filter the report so
> that only checked records are prepared for printing. Can anyone tell what
> code I need to use to do this, and where? I've tried various methods, but
> nothing seems to work. I'm using accesss 2003 by the way. Thanks. 

0
Allen
4/19/2007 11:11:53 AM
Solved it with a macro to open the report on a command button with the
following code:
[Labelling Query]![checkbox]=True
Thanks for the tip though, I forgot that yes/no could be so simply used. All
my efforts were clearly overcomplicated. Thanks, I'll keep that one.

Allen Browne wrote:
>In the Criteria row under your yes/no field, enter:
>    True
>The query shows only those records where the box is checked.

0
oliaccount
4/19/2007 1:51:50 PM
Reply:

Similar Artilces:

Hide a formula. Change Source data
I would like to hide a formula and be able to edit the data that feeds into the formula. When I protect and hide the formula, the data cells can not be changed either. Help would be much appreciated. By default, all cells are locked, so that when you protect the worksheet, all cells are not editable. To get around this, select all the cells in the worksheet (click the button above the "1" row header and to the left of the "A" column header), uncheck the Protected item on the Format Cells dialog. Then, go back and choose the cells that really should be locked, s...

Help with MX and SPF records
Have a new Exchange 2003 Server setup as part of a Small Business Server 2003 system. Do I need to have an MX and SPF record in DNS on this server? If so, what is the best way to set one up, examples please. I am new to Excange. Thanks. When I run ordb.org against my domain everything passes except I do not have an SPF record. - Create an A record if you don't already have one. This maps a hostname (mail.mydomain.com) to an IP address. - Create an MX record that points to the A record you created above with priority of 10. - Test both using nslookup nslookup -querytype=mx my...

Checkbox needs Double Click to check
I'm trying to uncheck checkbox1 when checkbox2 is checked, and uncheck checkbox2 when checkbox1 is checked. However, with my code (to uncheck the opposite box) in the Click event of a check box, Two clicks are required to display the check. The first click seems to select the checkbox control, then the second click does it. Any suggestions appreciated. "James" <nospam@please.com> wrote in message news:vpS4n.12681$%P5.7671@newsfe21.iad... > checkbox1 It seems from the default names that you posted that you are using dotnet. This group is for VB...

Decimals vanish when using excel-template for ADI reports (Excel 97)
Hi! I have made an Excel template for presenting ADI reports, bur I have some problems with decimal deissapearing when publishing to Excel 97 (works fine with Excel 2002) Details: A report is submitted from Oracle Applications (OA) via ADI. The report is generated by OA, and uses '.' as decimal separator. The report is imported into Excel (formated by an Excel template). At my PC with Excel 2002 this works fine. I can see at: Tools -> Options... under the "International" tab that the Decimal separator is set to ',' but still it works here. Decimal numbers appear ...

Unable to type into a CRM 3.0 form
I just switched to a Dell Latitude D610 and am running CRM 3.0 using both browser and Outlook 2003 client. I am working fine when all of a sudden, I can no longer type text onto a CRM form field. I am not locked up. I can still move my cursor, choose from a picklist, etc. I just cannot type into a text field. Any thoughts? May not be related however I have seen this with other web sites/forms. Do you have the google or msn toolbars installed? Try removing them and see if that fixes the problem. May not be related however I have seen this with other web sites/forms. Do you have the g...

Form Control and Data
Greetings Forum memebers! I'm new to this board, and thought I'd ask for some advice from the knowledgable people here.. Here is what I am trying to do... I have a workbook with 3 sheets (Sales, Schedule, Data). The idea is that an employee will input the date, customer's name, phone #, and have a drop down with a list of services to select. This would all be included on the Sales sheet. The data for the drop down box is on the Data sheet, and right now only includes the text of the service, no prices. So here is question #1 - How would I make it so that when the employee sele...

Hide #N/A in chart
Hi All, Kindly give me full steps to hide #N/A in chart. Thanks What you mean in "hide #N/A in chart"? "Hassan" escreveu: > Hi All, > > Kindly give me full steps to hide #N/A in chart. > > Thanks ...

Form for inputing criteria for a report's query
I have a report that is based on a query. The criteria for the start date changes and I want a form where I can input the date range (Between #2/2/2006# and #2/4/2006#) each time the report is run. Is there a way to set up the form so that the forms asks for the user to put in the start date and the end date and then put those results in the format above into my query to run the report correctly? Thanks, Robert ryonker wrote: >I have a report that is based on a query. The criteria for the start date >changes and I want a form where I can input the date range (Between >#2/2/2...

Hiding rows containing zeroes or blanks in pivot tables?
How do I hide rows containing zeroes or blanks in pivot tables? You can use programming to hide the rows with a zero total. For example: '====================================== Sub HidePivotZeroRows() 'hide worksheet rows that contain all zeros Dim rng As Range For Each rng In ActiveSheet _ .PivotTables(1).DataBodyRange.Rows If Application.Sum(rng) = 0 Then rng.EntireRow.Hidden = True Else 'unhide any previously hidden rows rng.EntireRow.Hidden = False End If Next rng End Sub '================================ Sub UnhidePivotRows() 'unhide all...

Return records only when all linked records meet criteria
I am trying to write a query that returns all records only when all [Result] values are >12.0 ? For example, the query below returns the following sample data: SELECT tbl_trans.TransNo, tbl_lab.LabNo, tbl_lab.Result FROM tbl_trans LEFT JOIN tbl_lab ON tbl_trans.Account = tbl_lab.Account WHERE (((tbl_trans.LabMet)<>"Y") AND ((tbl_trans.PtType) Not Like "O")) ORDER BY tbl_trans.TransNo TransNo LabNo Result 3 4610 9.7 3 1098 9.6 3 1047 8.7 3 875 5.6 5 1303 12.1 5 1214 12.4 5 1094 12.5 8 2176 11.6 8 1415 11.9 8 871 9.6 How do I mofiy the que...

ListBox and Navigation on Unbound forms
Good morning all, I actually have two questions similiar in relation. First is I have an unbound form with a list box on it called lstData. That is populated by a tbl_Titles. There are several txtBoxes and misc that are populated by the lstData. I have added navigation buttons to the form however I cannot get them to work. Does anyoone have any reference to how to use the First, Previous, Next, and Last record navagation on an unbound form? Second, on the same form I have an unbound txtbox which I want to use to give a record count. I currently am using Dcount method however th...

Opening a form by clicking on a record in a table
Is it possible to click on a field of a specific record of a table in microsoft access and open a form containing information about that record. If so how is it done? Thanks -- BULLDOG253 BULLDOG253 wrote: > Is it possible to click on a field of a specific record of a table in > microsoft access and open a form containing information about that > record. If so how is it done? > > Thanks It's possible to open a form from another form, but not from a table. Tables should never be used for anything after intitial development. -- Rick Brandt, Microsoft Access MVP Emai...

Display Data In Form From A Query
I have a form with the Control Source as "=Query!QTYForPPMProduction!SumOfQTY_PRODUCED" and this query runs prior to the form opening. The query runs fine, and the proper data displays in the datasheet view, but my form Text Box will not show the data. Any suggestions out there? =DLookup("[SumOfQTY_PRODUCED]", "[QTYForPPMProduction]") -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "GeorgeSoares" <GeorgeSoares@discussions.microsoft.com> wrote in message news:6F2E1E06-8772-4E6F-B1A7-647E14A1A7F0@microsoft.c...

Open Record by selecting on another form.
Hi I have a database that lists outstanding orders customers have, On the event procedure for txtbox Order Number on the currently opened form outstanding orders, I have selected that on double click it will open the form orders to the appropraite record. ie in the outstanding orders if fred has an order and you double click on the order number it opens up freds order from the orders form. I have used a where statement but must have got it wrong can someone point me in the right direction first time I have used the where statement. Private Sub Order_Number_DblClick(Cancel As Integer) Dim ...

Report on local resources
Has anybody made a report (SQL SRS) that displays projects and full names of local resources as they appear on the resource sheet in the MS Project client?? If so, willing to share the db query ? :)) When I look in to Reporting DB I can see something like Unassigned resource where I have local resource.. I'm trying to oust usage of local resources (yes I can prevent creation by security setting but before I do that I want to capture one whihc already have it) Regards, Vaso Hi Vaso, You have to use Published database to query the local resource names. (Note: Micros...

how can I add a sequential order number to my groups of records?
I have two tables: tbl_Street_Joiner_Main tbl_Street_Joiner I want to add a new field that is a sequential record order number for the 'tbl_Street_Joiner' entries which are grouped by the 'Joiner_Title_ID' field in the master table 'tbl_Street_Joiner_Main' This new field will then become a Sort Order field for when I rearrange the sort order within each group, which I hope to do 'manually' via some vba code; but... If the sort order is generated automatically via the SQL, will it still be possible to change the sort order via code? This is my curren...

Access Report Errors
Hello, We have a SQL database setup using an Access frontend with various menus setup. One of the menus is a Report menu that allows users to run reports setup in the Access frontend so the reports are contained in the Report section of the Access frontend. There are 4 reports to run, three of the four gives an error of “Microsoft Visual Basic – Run-time error ‘2501’: The OpenReport action was cancelled” and the user can choose “End” or “Debug”. The fourth report gives an error of “Microsoft Office Access – The OpenReport Action was canceled” After the errors nothing happens ...

Creating flags for certain fields in working Form
Hello, What is the best way to add a flag for specific fields? For example, Field A has a value and depending on the value, the flag could change be a choice such as Yes Or No or even changing the color of that specific cell in the table. Any advice much appreciated in advance. -- Best regards, Donald Ramer donaldramer@comcast.net You and I may not mean the same thing by "flag". If you want formatting changes depending of field value, take a look at "Conditional Formatting". -- Regards Jeff Boyce www.InformationFutures.net Microsoft Office/Access MVP http://m...

Display/Pull images from web onto form/into table?
Hello: I am experimenting with using Amazon Web Services to pull information into an Access database. I want to be able to use the cover art images Amazon makes available. At this point, I have gotten as far as being able to acquire the URL that points to the image. I thought this would be easy but I am struggling: 1. Is there a way, on a form, to set an image control to display the image using a URL as a pointer? Is the web browser control the only way to do this? 2. Is it possible / really hard to do / easy to somehow actually download the image into the table using VBA? Thanks! F...

Internet Explorer 7 causes Access XP to fail on loading form with embedded web browser control
I have an Access XP database with a form which displays a web page on loading. Prior to downloading and installing Internet Explorer 7 this worked perfectly. It still works perfectly on another computer on my network which does not have IE7 installed. But when I try and open it using the PC with IE7 it crashes and closes the program. I'm about to uninstall IE7 but if that doesn't work are there any more ideas? Thanks. Jon. On Mon, 17 Dec 2007 14:23:35 +1100, "Jon" <webindexing@optusnet.com.au> wrote: I'm not familiar with this specific problem, but I wou...

BOM Rolled Cost Report or Query
In GP 7.5 (or later versions?) is there a way to view the rolled up cost of a BOM assembly at current costs of the items? Can I view the assembled cost using the standard cost of the part items as well? To put this anouther way, I want to update the standard cost on the item master record for all items with BOMs with what it would cost today to assemble the BOM. A report(GP or Crystal) or SQL query/view, etc would all work fine. Thanks, Gregg Short MIS Cropking Inc short@cropking.com You could modify Reports-Inventory-Setup-Indented Bill of Materials to calculate a component Extende...

Return All Record if Check Box is Blank
How would I return a subset of records if a form check box is checked but return all records if the check box is blank. The formcheck box is: [Forms]![frm_switchboard]![chk_rndm] The field [RandomMarker] can have the values of "Y" or Null only. The following SQL pulls the correct data when the check box is checked, but I recive an "OpenForm action was canceled" when the box is blank. How would I modify the query to pull all results ([RandomMarker]="Y" or Null) when the box is not checked? SELECT tbl_tt_trans.TransNo, tbl_tt_trans.Fac, tbl_tt_tran...

Chart to report frequency of a value as a percentage of values
I have a column of information, I would like to create a pie chart which outlines the number of times a value exists as a percentage of the total number of values. Thanks John Check out XL's PivotTable capability. It is well suited to the kind of analysis you want to do. -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article <50BA1F4A-977F-475E-A221-6249418FDE2F@microsoft.com>, johnnyrover@discussions.microsoft.com says... > I have a column of information, I would like to create a p...

Grouping results on a report (need a little help)
I created a report based off of the filteredlead and filteredannotation views so that I could pull data regarding the leads and the notes regarding those leads, below is the SQL statement I use to do this SELECT dbo.FilteredLead.companyname, dbo.FilteredLead.new_productname, dbo.FilteredLead.new_clientbusinesstypename, dbo.FilteredLead.subject, dbo.FilteredAnnotation.notetext, dbo.FilteredLead.fullname, dbo.FilteredLead.description, dbo.FilteredLead.leadsourcecodename, dbo.FilteredLead.owneridname FROM dbo.FilteredAnnotation INNER JOIN dbo.FilteredLead ON dbo.FilteredAnnota...

Getting Data from a worksheet to a form
Hello, I am new to VBA (Excel 2007), and am struggling with the syntax to get data from a form into a worksheet. The scenario: 1. The 'Contacts' worksheet contains customer contacts - name, address, phone, etc. The user scrolls around, looking for someone to call. When they find one, 2. Run a macro that calls a module to pull the current row's data into a form. This is working. 3. Add contact info (e.g. who you talked to, date/time, notes) to the form; then 4. Click the 'AddContact' command button on the form, which will 5. Add a new row to th...