Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date parameters form
Message
From
10/04/2002 15:45:45
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Date parameters form
Miscellaneous
Thread ID:
00643430
Message ID:
00643430
Views:
38

I have a form, which I use as a navigator, containing all the tables/views I need. On this form I have a button which calls a form used to collect the dates which I need to run reports on. I have this code in the click event of the button on the navigator form which collects the dates and sends them back to a wait window.

DO FORM TestParam

WAIT WINDOW "BEG: " + DTOC(gaDateRange[1]) + " End:" + DTOC(gaDateRange[2]);
+ ' Employee: ' + gaDateRange[3]

RELEASE gaDateRange

How can I modify this code so that I can select only appointments for these dates and send them to a report. I guess in other words, I want these parameters sent to the report, but am unsure of how to define / call them. Another way of putting it is I need to take the dates from the wait window and pass them to a report.

On the date gathering parameters form, I have 2 textboxes titled txtdatefrom and txtdateto.

On the form level there is a procedure called :getdateto , with this code in it:

IF EMPTY(this.txtDateTo.Value)
*-- If the To date is empty, return a value in the distant future
RETURN date() + 100000
ELSE
RETURN this.txtDateTo.Value
ENDIF

On the form level there is a procedure called :validate , with this code in it:

IF thisform.txtDateTo.Value < thisform.txtDateFrom.Value AND ;
!EMPTY(thisform.txtDateFrom.Value)
=MESSAGEBOX(DATERANGEERROR_LOC,MB_ICONEXCLAMATION)
RETURN .F.
ENDIF

On the form level there is a procedure called :unload , with this code in it:

PUBLIC ARRAY gaDateRange[3]

DIMENSION gaDateRange[3]

gaDateRange[1] = THISFORM.DBegdate
gaDateRange[2] = THISFORM.DEnddate
gaDateRange[3] = THISFORM.cEmpName

DODEFAULT()
Next
Reply
Map
View

Click here to load this message in the networking platform