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

Limiting a Report to a Date Range

I have followed instructions on the http://allenbrowne.com/tips.html
for limiting a report to a date range. At the bottom there is a note
that says

You will end up using this form for all sorts of reports. You may add
an option group or list box that selects which report you want printed,
and a check box that determines whether the report should be opened in
preview mode.

I have tried several times to do this but can't figure it out. How can
I use this form for different reports, when this form specifies the
name of the form to open.
What I'd really like is to have a list box of all the reports where I
can choose a report and enter a date range and then hit the OK button
and it open the report for me.

I followed the instructions for List Box of Available Reports but that
didn't work for me. I kept getting the error message:
"EnumReorts" may not be a valid setting for the RowSourceType
property, or there was a compile error in the function.

How can I make all of this work?

Nov 13 '05 #1
2 3821
Sara:

In Allen's example, he sets the strReport property as follows:

strReport = "rptSales"

Assuming you create a list box with the report names, you can have it open
the report selected in the list box by changing this line to the following:

strReport = lstReports.ItemData(lstReports.ListIndex)

The ListIndex property returns the index of the selected item in the list
box. The ItemData property returns the value of the bound column in the
list box for the specified row (lstReports.ListIndex in this case).

Regarding the error message, please check that the function name in the Row
Source Type property matches the name of the function, EnumReports in this
case. The error message you quoted has the function name misspelled.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
"Sara" <yc******@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I have followed instructions on the http://allenbrowne.com/tips.html
for limiting a report to a date range. At the bottom there is a note
that says

You will end up using this form for all sorts of reports. You may add
an option group or list box that selects which report you want printed,
and a check box that determines whether the report should be opened in
preview mode.

I have tried several times to do this but can't figure it out. How can
I use this form for different reports, when this form specifies the
name of the form to open.
What I'd really like is to have a list box of all the reports where I
can choose a report and enter a date range and then hit the OK button
and it open the report for me.

I followed the instructions for List Box of Available Reports but that
didn't work for me. I kept getting the error message:
"EnumReorts" may not be a valid setting for the RowSourceType
property, or there was a compile error in the function.

How can I make all of this work?
Nov 13 '05 #2


I can't seem to have what I would like to work. (Having an date picker
form with a list of all reports)
So I'm going to limit the report to a date range using parameters. This
worked great, but I have one question.
If the user, for instance, wanted to display all the dates.. when the
parameter pops up asking for a start date, the user will not enter
anything and just click OK, when the parameter pops up for end date, the
user will not enter anything and just click OK. And then the report
should list all dates. This worked fine when I added NZ but now only
records that have a date entered are returned.

This is in my critera row under the date field:
Between Nz([Enter Start Date],[BasicDate]) And Nz([Enter End
Date],[BasicDate])

The problem now is that some records don't have a date entered. If the
user doesn't enter a date when prompted, I would like the report to list
ALL records the ones with the dates and ones without a date.

How would I do that?
*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Michelle | last post by:
Hi all I have a report which displays staff absences. An absence record has a start and end date and the type of absence, ie sickness, annual leave. I have created a form which allows the...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
1
by: Mike Cooper | last post by:
Hi everyone, This is a tough one. I have a database full of solicitations, identifying a customer and recording initial call, first followup, second followup, etc. My boss want to be able to...
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...
0
by: Stinky Pete | last post by:
Hi, The db I'm trying to update has a report form from which all other statistical forms and reports are selected/printed by dept, type, cost, number etc. The report form uses a date filter to...
5
by: sara | last post by:
I have reports that run from a form where the user can choose a date range, or they run automatically for a week in the "Weekly Reports" option. I created 2 queries and 2 reports - one query...
1
Altius
by: Altius | last post by:
Access Version: 2003 OS: XP Pro Sorry if this is a bit long winded. First a little info about the database. This database is used to keep track of checkout information from our production...
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...
12
smithj14
by: smithj14 | last post by:
I have a form to enter start and end dates then select a worker name to filter a report. This all works fine and when the report is open in preview mode it shows the date range in the txtboxes on the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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...

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.