By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,739 Members | 1,523 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,739 IT Pros & Developers. It's quick & easy.

Limiting a Report to a Date Range

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a


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 discussion thread is closed

Replies have been disabled for this discussion.