Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing User Input from forms
Message
From
14/06/2000 11:45:58
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00376185
Message ID:
00380253
Views:
21
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
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform