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

Date on a report

46
I am using Access 2007. I will be producing a report based on a query that when run will ask for a beginning and ending date. Is there a way to make this date range display in the report header, like "1/1/07 - 3/3/07" or such?

thanks,
Jeff
Mar 30 '08 #1
7 1543
NeoPa
32,556 Expert Mod 16PB
A better (and more standard) way to do this would be to design a form which would open the report.

The date range would be enterable on the form and could be passed either in the Filter parameter or in the OpenArgs parameter.

Remember the Me.OpenArgs value is reset to Null after the first line is executed in the Report_Open() procedure so save it first thing.
Apr 1 '08 #2
jmar93
46
A better (and more standard) way to do this would be to design a form which would open the report.

The date range would be enterable on the form and could be passed either in the Filter parameter or in the OpenArgs parameter.

Remember the Me.OpenArgs value is reset to Null after the first line is executed in the Report_Open() procedure so save it first thing.
I have read about the OpenArgs parameter and I have to admit I don't understand how to use it.

thanks,
Jeff
Apr 30 '08 #3
NeoPa
32,556 Expert Mod 16PB
If you have a specific question I can help.

I can probably lead you through it, but I won't do it all for you I'm afraid.
Apr 30 '08 #4
jmar93
46
If you have a specific question I can help.

I can probably lead you through it, but I won't do it all for you I'm afraid.
I have a report called rptBoardUsage that I open by first entering a beginning date and ending date in to a form called frmBoardUsageReport. When I press the command button it opens the report and runs the query that fills the report. A text box on the report displays the beginning date, it's data control sorce is
=[Forms]![frmBoardUsageReport]![BegDate]. This works great until I set the frmBoardUsageReport to close after the report opens, then a get the #name error.

I have tried using the following code in the report open module:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Report_Open(Cancel As Integer)
  2.     DoCmd.OpenReport rptBoardUsage, Text18 = Forms!frmBoardUsageReport!BegDate
  3.     DoCmd.OpenReport rptBoardUsage, Text20 = Forms!frmBoardUsageReport!EndDate
  4. End Sub
But it dosen't work. All I want is to be able to have the frm close when the report opens and still have the dates appear on the report.

thanks,
Jeff
May 1 '08 #5
NeoPa
32,556 Expert Mod 16PB
Running late.

I'll try to look at this for you tomorrow Jeff :)

PS. In the mean-time, can you dig up and post the code you use to open the report for me.

PPS. Remember to use the [ CODE ] tags provided ;)
May 1 '08 #6
jmar93
46
Running late.

I'll try to look at this for you tomorrow Jeff :)

PS. In the mean-time, can you dig up and post the code you use to open the report for me.

PPS. Remember to use the [ CODE ] tags provided ;)
I'm just opening the report with a macro using the on click property for the command button on the frmBoardUsageReport.

thanks,
Jeff
May 1 '08 #7
NeoPa
32,556 Expert Mod 16PB
In that case I suggest you may want to convert that to using some VBA code.

Not because macros don't work, but I don't know their limitations and I would never recommend using them.

Lastly, I can't help you in an area I'm so unfamiliar with.
May 1 '08 #8

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

Similar topics

2
by: Chris Curtis | last post by:
We have a program which is used to upload data to our website. A report file is saved each time and is supposed to reflect the date! Not being a java programmer I think the following code is used...
3
by: manning_news | last post by:
Using A2K. I've been asked to modify a report currently requiring only one date parameter to now accept a date range. The main report has 2 subreports and is not bound to a table or query. The...
1
by: Rinee | last post by:
Hi, I have a database of a bunch of contractors who have signed a safety agreement with us, their contact info, their insurance info, etc. Each was assigned an ID number as the main key. Each...
3
by: Matt MacDonald | last post by:
I'm trying to run a report using a form containing a crystal report viewer, but I keep getting an error saying tha "The specified value type is different to the current value type I'm trying to use...
1
by: Susan Bricker | last post by:
Greetings. I have a report (actually all of my reports in an MDB) that I want to date/time stamp at the bottom. Previously, I had used the builtin function of Now(). I thought that would give...
8
by: nishkrish | last post by:
Hi, I am new to access I created the form and report from Allen Browne's Frmwhat Date the way he has described but when i preview report it shows StartDate: name? Enddate: name? am i suppose...
13
by: alive84 | last post by:
Hi there, I have a two problems concerning option button values on a report and data report creator reports. The situation: I have three option value boxes two have 3 option and one has...
19
by: ali3n8 | last post by:
Hello I have attempted to create a date range report from a query called qrycustomerinformation. The field that contains the value of my date is called Followup. When i run a report on this it is...
3
by: Fred's | last post by:
Hi Folks, I have a report which the record source is a query name: Query3 and in my Query3 I have this parameter "between And ". Therefore, when I open my report, it will ask for a Start Date...
25
smithj14
by: smithj14 | last post by:
I have a form that has an option group (fraReports) which holds a list of reports to print. This part works fine. I select a report name and click print and that report opens. Now I want to add a...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...
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,...

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.