Freddie,
When the Click event method code calls "RunReport" it sends the current values of the two controls into the method. "cStatus" and "cInputYear" have those values before your SELECT statement runs.
Put this into the RunReport method immediately after the LPARAMETERS statement and before the SELECT statement:
WAIT WINDOW [cStatus TYPE = ]+TYPE("cStatus")+;
[, VALUE = ]+TRANSFORM(cStatus)
WAIT WINDOW [cInputYear TYPE = ]+TYPE("cInputYear")+;
[, VALUE = ]+TRANSFORM(cInputYear)
and report back what values you get. (You will see the first wait window, then press enter to see the next).
>When do FoxPro transfer values from txtInputStatus to cStatus in LPARAMETERS?
>
>Object: CmdRunReport Procedure: Click
>THISFORMSET.RunReport(THISFORM.TxtInputStatus.Value, ;
>THISFORM.TxtInputYear.Value)
>
>LPARAMETERS cStatus, cInputYear
>SELECT ;
>Ilspm, ;
>Status, ;
>Start, ;
>Comp, ;
>Ssp, ;
>Ils_k, ;
>Avail, ;
>Ship, ;
>Hull, ;
>Num_Chgs ;
>FROM Schd ;
>WHERE Status = cStatus AND ;
>left(SSP,2) = cInputYear ;
>INTO CURSOR Rptstatus1 ;
>ORDER BY 1
>
>Select Rptstatus1
>REPORT FORM Rptstatus1 PREVIEW