General information
Title:
Date parameters form
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only