473,503 Members | 1,669 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 1042
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,557 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
2996
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...
2
5758
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...
0
2236
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...
3
6884
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
2130
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...
2
3248
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...
3
8908
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...
12
2501
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...
16
6485
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,...
3
5108
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...
0
7199
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
7074
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
5572
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,...
1
5000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4667
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...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1501
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 ...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
374
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...

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.