Re: OPO Between condition?

From: Mike Kranzdorf <mikek_at_krt.com>
Date: 1997/01/13
Message-ID: <mikek-1301971136460001_at_pdl-ts1-34.jvnc.net>#1/1


In article <32D653AA.1C44_at_orisoft.com>, Webmestre Orisoft <Webmestre_at_orisoft.com> wrote:

> I would like to know the best way to open a form or a report according
> to conditions entered by the user. For example, I would like to print a
> report that will include all the records that are between 2 dates. The
> user would enter those 2 dates, either on a form or thru 2 InputBox.

Put up the dialog box, get the 2 dates, make a string for the resulting WHERE clause, set the report's DefaultCondition, then open the report.

btnOK.click:

strCond = "BETWEEN " & date1.value & " AND " & date2.value ' you might want to do some date validity/null checking rpt.DefaultCondition = strCond
rpt.OpenPreview

(Note that this is out of my head so there could be something missing.) Good luck,

P.S. Please don't crosspost to .misc, this belongs in .tools.

Mike Kranzdorf              mikek_at_krt.com
Kranzco Realty Trust        http://www.krt.com
Oracle Power Objects FAQ http://www.krt.com/mac/opofaq.html Received on Mon Jan 13 1997 - 00:00:00 CET

Original text of this message