>I want to compare units from two date ranges, say Range1 and Range2.
>Using a variation on TasTrade's DateRange class, I collect two pair of dates. I want to do this in a view, and use the parameters like this:
>
>SELECT Activity.date, Activity.units;
> FROM eh!Activity;
> WHERE Activity.date BETWEEN ?dDateFrom AND ?dDateTo;
> OR (Activity.date BETWEEN ?dDateFrom2 AND ?dDateTo2);
> ORDER BY Activity.date
>
>But --
>
>When I add Range1 and Range2 to sort out the units (by adding IIF lines):
>SELECT Activity.date, Activity.units;
> IIf(Activity.date =>?dDateFrom and Activity.date => IIf(Activity.date =>?dDateFrom2 and Activity.date => FROM eh!Activity;
> WHERE Activity.date BETWEEN ?dDateFrom AND ?dDateTo;
> OR (Activity.date BETWEEN ?dDateFrom2 AND ?dDateTo2);
> ORDER BY Activity.date
>
>I can't save the vue file without getting:
>"Enter a value for dDateFrom" Why the difference?
Without analyzing your code, you can download Erik Moore's eView from the files section here, and edit the view SQL to your heart's content...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.