Help Duane pls!

G

gr

Hi,
I adapted your Rotation Report from Calendar DB to build a
Time Chart for offers.
It worked excellent for a fixed starting date for the
chart.
In my database users have to options
1. Give a begining and ending date for querying offers and
then build the chart, works perfect.
2. Select from a list box different offers and build the
chart for the selected offers, not working.. =(
For achivieng this, first I build a SQL string to pick the
offersNo and Id from the list box and then use the
filterOn so the report only plots the selected offers that
is working.
The probleming i'm facing is setting a starting date.
first i tried with a simple StartingDate = DateAdd("m", -
2, Me.From) --- for each offer there is a starting and
ending date refered as "From" and "To" I use the -2 in
order to display offers that occur two months early
(client request) --- but since this statement is in the
detail section of the report the Me.From changes for every
offer and then the resulting graph is erroneus or an
Overflow error happens.

Then my next idea was to somehow from the underlying query
pick the oldest date in the From date and then pass it to
the unbound field report StartingDate. But, the record
source of the report is a query but i'm not filtering in
the query but in the open event of the report (I cant give
a query a multi selected list box as a parameter or
criteria)

So how can I pick the oldest date of the From field after
the filter has been applied (otherwise I might pick the
oldest date of all the offers and not of the selected
offers) and put this date as the startingDate?

thank you in advance and hope you can help me
 
D

Duane Hookom

You could use code to change the sql of the record source query prior to
opening. I assume you are looping through the multiple select list box to
create a where condition. This would make the min and max dates available in
your report.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top