steve4king
IS-IT--Management
I am a bit unclear on some of this script.. I am a newb at this and really trying to learn. If anyone feels inclined to assist, I could use a few explanations. (line by line??) Thanks in advance.
PS. I probably will not need the entire script below. I actually only need it to ask for one date (not a date range) The default will be blank (not -60days) And I just need be able to plug in that date all over the rest of my script.
PS. I probably will not need the entire script below. I actually only need it to ask for one date (not a date range) The default will be blank (not -60days) And I just need be able to plug in that date all over the rest of my script.
Code:
IF SELECT("zmirrinv")
SELECT 0
USE zmirrinv
ENDIF
SELECT ZMIRRINV
GO bott
LastDate = ZMIRRINV.DATE
USE
release Public_dStartDate, Public_dEndDate
PUBLIC Public_dStartDate, Public_dEndDate
DO WHILE .t.
dStartDate = LASTDATE-60
dEndDate = LASTDATE
DO FORM daterang WITH dStartDate, dEndDate, "Enter Range of Invoice Dates" TO lOkay
dStartDate = public_dStartDate
dEndDate = public_dEndDate
IF !lokay
RETURN
ENDIF
DO case
CASE dStartDate > dEndDate OR EMPTY(DStartDate) OR EMPTY(dEndDate)
MESSAGEBOX("Invalid or Empty Date Range!",0,"Re-Enter Dates")
LOOP
OTHERWISE
IF MESSAGEBOX("Are you sure you want to locate by date ranges "+ DTOC(dSTartDate)+" To " + DTOC(dEndDate) +"?",4+32+256)=6
EXIT
ELSE
return
endif
ENDCASE
ENDDO