473,568 Members | 2,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reports

19 New Member
hi,

I have a database in MS ACCESS 2000 in which I have a form with 6 fields. For this form I need to generate monthly and yearly reports. For the monthly reports I want to generate the report in such a way that when the user clicks for monthly option it should be able to give the month report for example if we want the report for january it should give the whole report for the january and if the user wants the report for january 2005 then it should generate the whole report for that particular month in that particular year. In this way I wanted to generate the report for all the 12 months for monthly report and for yearly report I should generate the reporst starting from the year 1991 to current year (like it may 2007/2008........ till future)........ ........I hope I am clear with what I want.
Dec 5 '06 #1
2 1044
MMcCarthy
14,534 Recognized Expert Moderator MVP
You need to design your report with the same record source as your form and then in the report open code you need to set criteria.

For example to get report to print records only for last month (for this example I am calling your date field EventDate as you didn't give a name):

Expand|Select|Wrap|Line Numbers
  1. Dim stLinkCriteria As String
  2.  
  3.    stLinkCriteria = "Month([EventDate])=" & Month(Now())-1
  4.    DoCmd.OpenReport "ReportName", , , stLinkCriteria
  5.  
  6.  
hi,

I have a database in MS ACCESS 2000 in which I have a form with 6 fields. For this form I need to generate monthly and yearly reports. For the monthly reports I want to generate the report in such a way that when the user clicks for monthly option it should be able to give the month report for example if we want the report for january it should give the whole report for the january and if the user wants the report for january 2005 then it should generate the whole report for that particular month in that particular year. In this way I wanted to generate the report for all the 12 months for monthly report and for yearly report I should generate the reporst starting from the year 1991 to current year (like it may 2007/2008........ till future)........ ........I hope I am clear with what I want.
Dec 5 '06 #2
NeoPa
32,564 Recognized Expert Moderator MVP
In the OnOpen event of the report you can do all sorts of things to affect how the report works.
Another problem here though is accessing the information that the caller knows (IE. which month / year).
You can do this with a Public variable in a module (which should be visible to both caller and callee), or you can define a Function to handle setting and returning value(s).
Dec 5 '06 #3

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

Similar topics

5
3007
by: BStorm | last post by:
I have a transaction log file where the DataSet table's Description column is actually delimited into "subcolumns" based upon the transaction id. I would like to parse these into separate fields for reporting purposes and am wondering if anyone knows if this is easily accomplished using the .NET version of Crystal Reports? For example, the...
2
5760
by: Andrew | last post by:
Hi there: I can successfully control a report's GroupLevel ControlSource property by using: ..Reports!rptEESTMT_A.GroupLevel(i).ControlSource = "CorpName" where rptEESTMT_A is the actual name of the Access Report. However, I have about 75 reports to process. Each report has its own unique
0
2253
by: Ian | last post by:
(Sorry if I have repeated this, it did not appear the first time) I have the following code on a button. The idea is that when this button is clicked it prints several reports automatically then loops through several other reports and prints them. These reports are not sent to a printer but sent to a program called Fine Print PDF Factory...
3
6898
by: Gheaci Maschl | last post by:
Hi all! I would like to have your opinion about my problem and my proposal how to solve it: Ingredients: - BTriev database - Crystal Reports - maybe MS Access - Liinos6 (small ERP software)
1
2134
by: KEVIN97810 | last post by:
Hello to all, I am trying to fill all my reports in a listbox but I may not need to show other reports. How do you modify this function to do that. I have losts of reports but don't want to show all of them. I need to exculed certain reports from the list box. Public Function EnumReports(fld As Control, id As Variant, row As Variant,...
2
3254
by: B.Newman | last post by:
I've got some VB.NET code that *should* get a list of reports from an Access MDB and populate a list box with them. It doesn't detect any of the reports at all. oAccess.Reports.Count comes up as 0. There are four reports in the MDB. They are not hidden. They don't have special characters in their names. There is no security on the MDB and...
3
8911
by: VMI | last post by:
I know this may not be the best NG for this, but I feel you guys know more about this than any of the other NGs. I need to build several simple reports (over 50 of them and they get their data from sql server) and I was wondering whish of these is the better tool .. We're still not sure if they'll be loaded from an existing VB6 application...
12
2512
by: Tony Ciconte | last post by:
We are evaluating the prospect of integrating and/or using Crystal Reports with some of our current products. Some of these are still in Access 97 and are running well. Since we cannot include the report wizard in a runtime environment, we are looking at ad hoc report writers like Crystal. Can we include Crystal with our runtimes and/or is...
16
6497
by: JoeW | last post by:
I'm utilizing a database that I created within MS Access within a program I've created in VB.NET. I am using the VB front end to navigate the information, but want to be able to print a report, that I've also created within MS Access. I've attempted using the Access.Application instance, but I get errors when it tries to load the ...
3
5119
by: joelpollock | last post by:
I'm having trouble continuously page numbering a large report in MS Access. The report is made up of three separate Access reports which I join together at the end. In the past I have opened the reports and viewed them to see how long they are then go in and manually type the page number and total page number. I am aware of the and ...
0
7693
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, 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...
0
7604
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...
0
7916
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, 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. ...
0
8117
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7660
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6275
agi2029
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...
0
3651
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...
1
2101
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
932
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.